Implement per-monitor window geometry settings

This commit is contained in:
Cacodemon345
2022-07-05 14:09:14 +06:00
parent 554cd27121
commit b588f163c6
6 changed files with 55 additions and 34 deletions

View File

@@ -80,9 +80,11 @@ extern char log_path[1024]; /* (O) full path of logfile */
extern char vm_name[1024]; /* (O) display name of the VM */
extern int window_w, window_h, /* (C) window size and */
window_x, window_y, /* position info */
window_remember,
#define window_x monitor_settings[0].mon_window_x
#define window_y monitor_settings[0].mon_window_y
#define window_w monitor_settings[0].mon_window_w
#define window_h monitor_settings[0].mon_window_h
extern int window_remember,
vid_resize, /* (C) allow resizing */
invert_display, /* (C) invert the display */
suppress_overscan; /* (C) suppress overscans */

View File

@@ -109,10 +109,6 @@ typedef struct monitor_t
mon_video_timing_write_l;
int mon_overscan_x;
int mon_overscan_y;
int mon_window_x;
int mon_window_y;
int mon_window_w;
int mon_window_h;
int mon_force_resize;
int mon_fullchange;
int mon_changeframecount;
@@ -126,8 +122,16 @@ typedef struct monitor_t
struct blit_data_struct* mon_blit_data_ptr;
} monitor_t;
typedef struct monitor_settings_t {
int mon_window_x; /* (C) window size and position info. */
int mon_window_y;
int mon_window_w;
int mon_window_h;
} monitor_settings_t;
#define MONITORS_NUM 8
extern monitor_t monitors[MONITORS_NUM];
extern monitor_settings_t monitor_settings[MONITORS_NUM];
extern atomic_flag doresize_monitors[MONITORS_NUM];
extern int monitor_index_global;
extern int herc_enabled;