2020-11-06 14:56:32 +01:00
|
|
|
#pragma once
|
2021-02-06 14:53:47 +01:00
|
|
|
|
|
|
|
struct resolution_info
|
|
|
|
{
|
2021-02-16 17:03:45 +01:00
|
|
|
int16_t ScreenWidth;
|
|
|
|
int16_t ScreenHeight;
|
|
|
|
int16_t TableWidth;
|
|
|
|
int16_t TableHeight;
|
|
|
|
int16_t ResolutionMenuId;
|
2021-02-06 14:53:47 +01:00
|
|
|
};
|
|
|
|
|
2020-11-06 14:56:32 +01:00
|
|
|
class fullscrn
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static int screen_mode;
|
|
|
|
static int display_changed;
|
2021-02-06 14:53:47 +01:00
|
|
|
static const resolution_info resolution_array[3];
|
2021-02-09 16:09:44 +01:00
|
|
|
static float ScaleX;
|
|
|
|
static float ScaleY;
|
2021-09-05 09:47:05 +02:00
|
|
|
static int OffsetX;
|
|
|
|
static int OffsetY;
|
2020-11-06 14:56:32 +01:00
|
|
|
|
2021-09-05 09:47:05 +02: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);
|
2021-02-06 14:53:47 +01:00
|
|
|
static int GetResolution();
|
2021-09-14 14:33:18 +02:00
|
|
|
static void SetResolution(int value);
|
2021-02-06 14:53:47 +01:00
|
|
|
static int GetMaxResolution();
|
2021-02-09 16:09:44 +01:00
|
|
|
static void window_size_changed();
|
2022-08-31 06:58:03 +02:00
|
|
|
static SDL_Rect GetScreenRectFromPinballRect(SDL_Rect rect);
|
|
|
|
static float GetScreenToPinballRatio();
|
2020-11-06 14:56:32 +01:00
|
|
|
private :
|
2021-02-06 14:53:47 +01:00
|
|
|
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
|
|
|
};
|