win_opengl: UI for options and add them to config. Reloading changed options at runtime. Improved framerate limitter.

This commit is contained in:
ts-korhonen
2021-04-23 16:09:45 +03:00
parent 579e221a76
commit 2bf6c7aa11
12 changed files with 325 additions and 104 deletions

View File

@@ -91,7 +91,7 @@ extern int vid_cga_contrast, /* (C) video */
enable_overscan, /* (C) video */
force_43, /* (C) video */
video_vsync, /* (C) video */
video_frametime, /* (C) video */
video_framerate, /* (C) video */
gfxcard; /* (C) graphics/video card */
extern char video_shader[512]; /* (C) video */
extern int serial_enabled[], /* (C) enable serial ports */

View File

@@ -117,6 +117,7 @@
#define IDS_2141 2141 // "%hs Device Configuration"
#define IDS_2142 2142 // "Monitor in sleep mode"
#define IDS_2143 2143 // "OpenGL Shaders (*.GLSL)..."
#define IDS_2144 2144 // "OpenGL options"
#define IDS_4096 4096 // "Hard disk (%s)"
#define IDS_4097 4097 // "%01i:%01i"
@@ -224,7 +225,7 @@
#define IDS_LANG_ENUS IDS_7168
#define STR_NUM_2048 96
#define STR_NUM_2048 97
#define STR_NUM_3072 11
#define STR_NUM_4096 39
#define STR_NUM_4352 6

View File

@@ -101,6 +101,7 @@ extern int plat_dir_check(char *path);
extern int plat_dir_create(char *path);
extern uint64_t plat_timer_read(void);
extern uint32_t plat_get_ticks(void);
extern uint32_t plat_get_micro_ticks(void);
extern void plat_delay_ms(uint32_t count);
extern void plat_pause(int p);
extern void plat_mouse_capture(int on);
@@ -111,7 +112,7 @@ extern void plat_vidsize(int x, int y);
extern void plat_setfullscreen(int on);
extern void plat_resize(int x, int y);
extern void plat_vidapi_enable(int enabled);
extern void plat_vid_reload_options(void);
/* Resource management. */
extern void set_language(int id);

View File

@@ -63,6 +63,10 @@ DECLARE_HANDLE(DPI_AWARENESS_CONTEXT);
#define ZIP_SUBMENU_NAME L"ZIPSubmenu"
#define MO_SUBMENU_NAME L"MOSubmenu"
#ifdef DEV_BRANCH /* feature-opengl */
#define VID_GL_SUBMENU L"VidGLSubMenu"
#endif
/* Application-specific window messages.
A dialog sends 0x8895 with WPARAM = 1 followed by 0x8896 with WPARAM = 1 on open,

View File

@@ -23,5 +23,6 @@ extern int opengl_pause(void);
extern void opengl_close(void);
extern void opengl_set_fs(int fs);
extern void opengl_resize(int w, int h);
extern void opengl_reload(void);
#endif /*!WIN_OPENGL_H*/