SpaceCadetPinball/SpaceCadetPinball/fullscrn.h

39 lines
843 B
C
Raw Permalink Normal View History

2020-11-06 14:56:32 +01:00
#pragma once
struct resolution_info
{
int16_t ScreenWidth;
int16_t ScreenHeight;
int16_t TableWidth;
int16_t TableHeight;
int16_t ResolutionMenuId;
};
2020-11-06 14:56:32 +01:00
class fullscrn
{
public:
static int screen_mode;
static int display_changed;
static const resolution_info resolution_array[3];
2021-02-09 16:09:44 +01:00
static float ScaleX;
static float ScaleY;
static int OffsetX;
static int OffsetY;
2020-11-06 14:56:32 +01:00
static void init();
2020-11-16 15:12:31 +01:00
static void shutdown();
2020-11-06 14:56:32 +01:00
static int set_screen_mode(int isFullscreen);
2020-11-16 15:12:31 +01:00
static void activate(int flag);
static int GetResolution();
static void SetResolution(int value);
static int GetMaxResolution();
2021-02-09 16:09:44 +01:00
static void window_size_changed();
static SDL_Rect GetScreenRectFromPinballRect(SDL_Rect rect);
static float GetScreenToPinballRatio();
2020-11-06 14:56:32 +01:00
private :
static int resolution;
2020-11-16 15:12:31 +01:00
2020-11-06 14:56:32 +01:00
static int enableFullscreen();
2020-11-16 15:12:31 +01:00
static int disableFullscreen();
2020-11-06 14:56:32 +01:00
};