X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.c;h=00e9c7295edde77c0f1f3fd117c39a29bb69c72a;hb=89401883eeb279c7101b1c635477a9bccc123d21;hp=222b6f609a19d9d1fb899891b064e6f0dfa14f8e;hpb=a1fabab3e5db1baab46a95a318b27fdf33d470cc;p=rocksndiamonds.git diff --git a/src/libgame/system.c b/src/libgame/system.c index 222b6f60..00e9c729 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -33,6 +33,7 @@ struct OptionInfo options; struct VideoSystemInfo video; struct AudioSystemInfo audio; struct GfxInfo gfx; +struct OverlayInfo overlay; struct ArtworkInfo artwork; struct JoystickInfo joystick; struct SetupInfo setup; @@ -97,6 +98,16 @@ void InitProgramInfo(char *argv0, char *config_filename, char *userdata_subdir, program.log_file[LOG_ERR_ID] = program.log_file_default[LOG_ERR_ID] = stderr; } +void InitScoresInfo() +{ + char *global_scores_dir = getPath2(getCommonDataDir(), SCORES_DIRECTORY); + + program.global_scores = directoryExists(global_scores_dir); + program.many_scores_per_name = !program.global_scores; + + free(global_scores_dir); +} + void SetWindowTitle() { program.window_title = program.window_title_function(); @@ -270,6 +281,21 @@ void InitGfxOtherSettings() gfx.cursor_mode = CURSOR_DEFAULT; } +void InitOverlayInfo() +{ + overlay.active = FALSE; +} + +void SetOverlayActive(boolean active) +{ + overlay.active = active; +} + +boolean GetOverlayActive() +{ + return overlay.active; +} + void SetDrawDeactivationMask(int draw_deactivation_mask) { gfx.draw_deactivation_mask = draw_deactivation_mask; @@ -363,6 +389,9 @@ void LimitScreenUpdates(boolean enable) void InitVideoDisplay(void) { SDLInitVideoDisplay(); +#if defined(TARGET_SDL2) + SDLSetDisplaySize(); +#endif } void CloseVideoDisplay(void) @@ -378,6 +407,11 @@ void InitVideoBuffer(int width, int height, int depth, boolean fullscreen) video.height = height; video.depth = GetRealDepth(depth); + video.screen_width = width; + video.screen_height = height; + video.screen_xoffset = 0; + video.screen_yoffset = 0; + video.fullscreen_available = FULLSCREEN_STATUS; video.fullscreen_enabled = FALSE;