X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsdl.c;h=1614b1e2fe4a316130af2ee2d8c0c6baa3483134;hb=51cc8f17af487cc53aafccf050ff1b16fec878a9;hp=e005eb0ef829b69d85053b2da460c440c3499b76;hpb=e8521f03e3e2e3952137086b6aaee3a572b01aa1;p=rocksndiamonds.git diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index e005eb0e..1614b1e2 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -338,7 +338,7 @@ static boolean SDLHasAlpha(SDL_Surface *surface) return (blend_mode == SDL_BLENDMODE_BLEND); } -static void SDLSetAlpha(SDL_Surface *surface, boolean set, int alpha) +void SDLSetAlpha(SDL_Surface *surface, boolean set, int alpha) { SDL_BlendMode blend_mode = (set ? SDL_BLENDMODE_BLEND : SDL_BLENDMODE_NONE); @@ -876,6 +876,8 @@ void SDLSetScreenProperties(void) SDLSetDisplaySize(); SDLSetScreenSizeAndOffsets(video.width, video.height); SDLSetScreenSizeForRenderer(video.screen_width, video.screen_height); + + SetOverlayGridSizeAndButtons(); } void SDLSetScreenRenderingMode(char *screen_rendering_mode) @@ -1223,6 +1225,9 @@ void SDLFadeRectangle(int x, int y, int width, int height, draw_border_function(); UpdateScreen_WithFrameDelay(&dst_rect2); + + if (PendingEscapeKeyEvent()) + break; } } } @@ -1279,6 +1284,9 @@ void SDLFadeRectangle(int x, int y, int width, int height, // only update the region of the screen that is affected from fading UpdateScreen_WithFrameDelay(&dst_rect2); + + if (PendingEscapeKeyEvent()) + break; } } else // fading in, fading out or cross-fading @@ -1305,6 +1313,9 @@ void SDLFadeRectangle(int x, int y, int width, int height, // only update the region of the screen that is affected from fading UpdateScreen_WithFrameDelay(&dst_rect); + + if (PendingEscapeKeyEvent()) + break; } } @@ -2707,7 +2718,7 @@ void SDLInitJoysticks(void) boolean print_warning = !sdl_joystick_subsystem_initialized; char *mappings_file_base = getPath2(options.conf_directory, GAMECONTROLLER_BASENAME); - char *mappings_file_user = getPath2(getUserGameDataDir(), + char *mappings_file_user = getPath2(getMainUserGameDataDir(), GAMECONTROLLER_BASENAME); int num_mappings; int i;