[gens-sdl] EmuLoop.cpp::doStretchMode(): Use vBackend directly.
authorDavid Korth <gerbilsoft@gerbilsoft.com>
Thu, 3 Sep 2015 02:15:12 +0000 (22:15 -0400)
committerDavid Korth <gerbilsoft@gerbilsoft.com>
Thu, 3 Sep 2015 02:15:12 +0000 (22:15 -0400)
We're caching sdlHandler's vBackend for this exact reason.

Incidentally, later in the function, we *do* use vBackend directly
in order to print the message on the screen.

src/gens-sdl/EmuLoop.cpp

index 55c866b..eb424c4 100644 (file)
@@ -286,10 +286,10 @@ static void doSaveState(void)
 static void doStretchMode(void)
 {
        // Change stretch mode parameters.
-       int stretchMode = (int)sdlHandler->vBackend()->stretchMode();
+       int stretchMode = (int)vBackend->stretchMode();
        stretchMode++;
        stretchMode &= 3;
-       sdlHandler->vBackend()->setStretchMode((VBackend::StretchMode_t)stretchMode);
+       vBackend->setStretchMode((VBackend::StretchMode_t)stretchMode);
 
        // Show an OSD message.
        const char *stretch;