X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fjoystick.cpp;h=9b0f3c7075a5b3e09b634ce9c462d78a5f48aff1;hb=220217373079ff8d737f3d6dc07bbbad8f46e1ca;hp=89a0098afe470d067c8669af3043e31ea653866d;hpb=4d3ead830ff98da48edbade00c3746aaa0b865c8;p=virtualjaguar diff --git a/src/joystick.cpp b/src/joystick.cpp index 89a0098..9b0f3c7 100644 --- a/src/joystick.cpp +++ b/src/joystick.cpp @@ -9,6 +9,7 @@ #include #include #include "jaguar.h" +#include "video.h" #define BUTTON_U 0 #define BUTTON_D 1 @@ -35,7 +36,7 @@ // Private function prototypes -void main_screen_switch(void); +//void main_screen_switch(void); // Global vars @@ -58,28 +59,6 @@ int objectPtr = 0; bool startMemLog = false; -void main_screen_switch(void) -{ - extern SDL_Surface * mainSurface; - extern Uint32 mainSurfaceFlags; - extern bool fullscreen; - - fullscreen = !fullscreen; - mainSurfaceFlags &= ~SDL_FULLSCREEN; - if (fullscreen) - mainSurfaceFlags |= SDL_FULLSCREEN; - - mainSurface = SDL_SetVideoMode(tom_width, tom_height, 16, mainSurfaceFlags); - - if (mainSurface == NULL) - { - WriteLog("Joystick: SDL is unable to set the video mode: %s\n", SDL_GetError()); - exit(1); - } - - SDL_WM_SetCaption("Virtual Jaguar", "Virtual Jaguar"); -} - void joystick_init(void) { joystick_reset(); @@ -100,7 +79,7 @@ void joystick_exec(void) iLeft = iRight = false; if ((keystate[SDLK_LALT] || keystate[SDLK_RALT]) & keystate[SDLK_RETURN]) - main_screen_switch(); + ToggleFullscreen(); /* Added/Changed by SDLEMU (http://sdlemu.ngemu.com) */