added support for multiple user game data directories
[rocksndiamonds.git] / src / libgame / sdl.c
index 0325c45f038383c8a5e971be60c59dd1d9930906..4108b2b531c533825c092df0ceab9fb1fd596d90 100644 (file)
@@ -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;