X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsdl.c;h=4108b2b531c533825c092df0ceab9fb1fd596d90;hb=3b7f6c6d572ffd50744e76f9ed93733785e13211;hp=0325c45f038383c8a5e971be60c59dd1d9930906;hpb=41b805f296b21b950aa8372c2f1792bf301f4ef9;p=rocksndiamonds.git diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index 0325c45f..4108b2b5 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -297,18 +297,6 @@ static boolean equalSDLPixelFormat(SDL_PixelFormat *format1, format1->Bmask == format2->Bmask); } -#if 0 -static Pixel SDLGetColorKey(SDL_Surface *surface) -{ - Pixel color_key; - - if (SDL_GetColorKey(surface, &color_key) != 0) - return -1; - - return color_key; -} -#endif - static void SDLCopyColorKey(SDL_Surface *src_surface, SDL_Surface *dst_surface) { Pixel color_key; @@ -350,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); @@ -888,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) @@ -2719,7 +2709,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;