Skip to content
Snippets Groups Projects
Commit 6762bbd4 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Add fullscreen GDI startup mode.

parent ba28fc1b
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4448 failed
...@@ -521,6 +521,7 @@ CIOLIBEXPORT int initciolib(int mode) ...@@ -521,6 +521,7 @@ CIOLIBEXPORT int initciolib(int mode)
#if defined(WITH_GDI) #if defined(WITH_GDI)
case CIOLIB_MODE_GDI: case CIOLIB_MODE_GDI:
case CIOLIB_MODE_GDI_FULLSCREEN:
try_gdi_init(mode); try_gdi_init(mode);
break; break;
#endif #endif
......
...@@ -80,6 +80,7 @@ enum { ...@@ -80,6 +80,7 @@ enum {
,CIOLIB_MODE_SDL ,CIOLIB_MODE_SDL
,CIOLIB_MODE_SDL_FULLSCREEN ,CIOLIB_MODE_SDL_FULLSCREEN
,CIOLIB_MODE_GDI ,CIOLIB_MODE_GDI
,CIOLIB_MODE_GDI_FULLSCREEN
}; };
enum ciolib_mouse_ptr { enum ciolib_mouse_ptr {
......
...@@ -19,6 +19,7 @@ static bool maximized = false; ...@@ -19,6 +19,7 @@ static bool maximized = false;
static uint16_t winxpos, winypos; static uint16_t winxpos, winypos;
static const DWORD style = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_VISIBLE; static const DWORD style = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_VISIBLE;
static const DWORD fs_style = WS_POPUP | WS_VISIBLE; static const DWORD fs_style = WS_POPUP | WS_VISIBLE;
#define STYLE (fullscreen ? fs_style : style)
static HCURSOR cursor; static HCURSOR cursor;
static HANDLE init_sem; static HANDLE init_sem;
static int xoff, yoff; static int xoff, yoff;
...@@ -66,6 +67,8 @@ static pthread_mutex_t stypelock; ...@@ -66,6 +67,8 @@ static pthread_mutex_t stypelock;
// Internal implementation // Internal implementation
static bool get_monitor_size_pos(int *w, int *h, int *xpos, int *ypos);
static LPWSTR static LPWSTR
utf8_to_utf16(const uint8_t *str8, int buflen) utf8_to_utf16(const uint8_t *str8, int buflen)
{ {
...@@ -181,7 +184,9 @@ UnadjustWindowSize(int *w, int *h) ...@@ -181,7 +184,9 @@ UnadjustWindowSize(int *w, int *h)
RECT r = {0}; RECT r = {0};
bool ret; bool ret;
ret = AdjustWindowRect(&r, style, FALSE); if (fullscreen)
return true;
ret = AdjustWindowRect(&r, STYLE, FALSE);
if (ret) { if (ret) {
*w += r.left - r.right; *w += r.left - r.right;
*h += r.top - r.bottom; *h += r.top - r.bottom;
...@@ -482,17 +487,42 @@ gdi_handle_activate(HWND hwnd, WPARAM wParam) ...@@ -482,17 +487,42 @@ gdi_handle_activate(HWND hwnd, WPARAM wParam)
} }
static bool static bool
gdi_get_monitor_size(int *w, int *h) get_monitor_size_pos(int *w, int *h, int *xpos, int *ypos)
{ {
bool primary = false;
bool ret = false;
HMONITOR mon; HMONITOR mon;
MONITORINFO mi; MONITORINFO mi;
bool ret;
mon = MonitorFromWindow(win, MONITOR_DEFAULTTOPRIMARY); if (!primary && win == NULL)
primary = true;
mon = MonitorFromWindow(win, primary ? MONITOR_DEFAULTTOPRIMARY : MONITOR_DEFAULTTONEAREST);
if (mon) {
mi.cbSize = sizeof(mi); mi.cbSize = sizeof(mi);
ret = GetMonitorInfoW(mon, &mi); ret = GetMonitorInfoW(mon, &mi);
if (ret) {
if (fullscreen) {
if (w)
*w = mi.rcMonitor.right - mi.rcMonitor.left;
if (h)
*h = mi.rcMonitor.bottom - mi.rcMonitor.top;
if (xpos)
*xpos = mi.rcMonitor.left;
if (ypos)
*ypos = mi.rcMonitor.top;
}
else {
if (w)
*w = mi.rcWork.right - mi.rcWork.left; *w = mi.rcWork.right - mi.rcWork.left;
if (h)
*h = mi.rcWork.bottom - mi.rcWork.top; *h = mi.rcWork.bottom - mi.rcWork.top;
if (xpos)
*xpos = mi.rcWork.left;
if (ypos)
*ypos = mi.rcWork.top;
}
}
}
return ret; return ret;
} }
...@@ -505,7 +535,7 @@ handle_wm_getminmaxinfo(MINMAXINFO *inf) ...@@ -505,7 +535,7 @@ handle_wm_getminmaxinfo(MINMAXINFO *inf)
double mult; double mult;
RECT r; RECT r;
gdi_get_monitor_size(&monw, &monh); get_monitor_size_pos(&monw, &monh, NULL, NULL);
maxw = monw; maxw = monw;
maxh = monh; maxh = monh;
UnadjustWindowSize(&maxw, &maxh); UnadjustWindowSize(&maxw, &maxh);
...@@ -519,7 +549,7 @@ handle_wm_getminmaxinfo(MINMAXINFO *inf) ...@@ -519,7 +549,7 @@ handle_wm_getminmaxinfo(MINMAXINFO *inf)
r.left = 0; r.left = 0;
r.right = maxw; r.right = maxw;
r.bottom = maxh; r.bottom = maxh;
AdjustWindowRect(&r, style, FALSE); AdjustWindowRect(&r, STYLE, FALSE);
inf->ptMaxTrackSize.x = r.right - r.left; inf->ptMaxTrackSize.x = r.right - r.left;
inf->ptMaxTrackSize.y = r.bottom - r.top; inf->ptMaxTrackSize.y = r.bottom - r.top;
inf->ptMaxSize.x = inf->ptMaxTrackSize.x; inf->ptMaxSize.x = inf->ptMaxTrackSize.x;
...@@ -531,7 +561,7 @@ handle_wm_getminmaxinfo(MINMAXINFO *inf) ...@@ -531,7 +561,7 @@ handle_wm_getminmaxinfo(MINMAXINFO *inf)
r.left = 0; r.left = 0;
r.right = minw; r.right = minw;
r.bottom = minh; r.bottom = minh;
AdjustWindowRect(&r, style, FALSE); AdjustWindowRect(&r, STYLE, FALSE);
inf->ptMinTrackSize.x = r.right - r.left; inf->ptMinTrackSize.x = r.right - r.left;
inf->ptMinTrackSize.y = r.bottom - r.top; inf->ptMinTrackSize.y = r.bottom - r.top;
...@@ -609,8 +639,7 @@ gdi_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ...@@ -609,8 +639,7 @@ gdi_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
r.right = wParam; r.right = wParam;
r.bottom = lParam; r.bottom = lParam;
pthread_mutex_unlock(&vstatlock); pthread_mutex_unlock(&vstatlock);
if (!fullscreen) AdjustWindowRect(&r, STYLE, FALSE);
AdjustWindowRect(&r, style, FALSE);
SetWindowPos(win, NULL, 0, 0, r.right - r.left, r.bottom - r.top, SWP_NOMOVE|SWP_NOOWNERZORDER|SWP_NOZORDER); SetWindowPos(win, NULL, 0, 0, r.right - r.left, r.bottom - r.top, SWP_NOMOVE|SWP_NOOWNERZORDER|SWP_NOZORDER);
return true; return true;
case WM_USER_SETPOS: case WM_USER_SETPOS:
...@@ -628,7 +657,7 @@ gdi_snap(bool grow) ...@@ -628,7 +657,7 @@ gdi_snap(bool grow)
if (maximized || fullscreen) if (maximized || fullscreen)
return; return;
gdi_get_monitor_size(&mw, &mh); get_monitor_size_pos(&mw, &mh, NULL, NULL);
UnadjustWindowSize(&mw, &mh); UnadjustWindowSize(&mw, &mh);
pthread_mutex_lock(&vstatlock); pthread_mutex_lock(&vstatlock);
bitmap_snap(grow, mw, mh); bitmap_snap(grow, mw, mh);
...@@ -642,7 +671,7 @@ gdi_snap(bool grow) ...@@ -642,7 +671,7 @@ gdi_snap(bool grow)
#define WMOD_SHIFT 8 #define WMOD_SHIFT 8
#define WMOD_LSHIFT 16 #define WMOD_LSHIFT 16
#define WMOD_RSHIFT 32 #define WMOD_RSHIFT 32
bool static bool
magic_message(MSG msg) magic_message(MSG msg)
{ {
static uint8_t mods = 0; static uint8_t mods = 0;
...@@ -716,7 +745,7 @@ magic_message(MSG msg) ...@@ -716,7 +745,7 @@ magic_message(MSG msg)
pthread_mutex_lock(&vstatlock); pthread_mutex_lock(&vstatlock);
window_scaling = vstat.scaling; window_scaling = vstat.scaling;
pthread_mutex_unlock(&vstatlock); pthread_mutex_unlock(&vstatlock);
SetWindowLongPtr(win, GWL_STYLE, fs_style); SetWindowLongPtr(win, GWL_STYLE, STYLE);
PostMessageW(win, WM_USER_SETPOS, mi.rcMonitor.left, mi.rcMonitor.top); PostMessageW(win, WM_USER_SETPOS, mi.rcMonitor.left, mi.rcMonitor.top);
PostMessageW(win, WM_USER_SETSIZE, mi.rcMonitor.right - mi.rcMonitor.left, mi.rcMonitor.bottom - mi.rcMonitor.top); PostMessageW(win, WM_USER_SETSIZE, mi.rcMonitor.right - mi.rcMonitor.left, mi.rcMonitor.bottom - mi.rcMonitor.top);
} }
...@@ -730,7 +759,7 @@ magic_message(MSG msg) ...@@ -730,7 +759,7 @@ magic_message(MSG msg)
int w, h; int w, h;
bitmap_get_scaled_win_size(window_scaling, &w, &h, 0, 0); bitmap_get_scaled_win_size(window_scaling, &w, &h, 0, 0);
SetWindowLongPtr(win, GWL_STYLE, style); SetWindowLongPtr(win, GWL_STYLE, STYLE);
PostMessageW(win, WM_USER_SETSIZE, w, h); PostMessageW(win, WM_USER_SETSIZE, w, h);
PostMessageW(win, WM_USER_SETPOS, window_left, window_top); PostMessageW(win, WM_USER_SETPOS, window_left, window_top);
} }
...@@ -773,9 +802,14 @@ gdi_thread(void *arg) ...@@ -773,9 +802,14 @@ gdi_thread(void *arg)
MSG msg; MSG msg;
RECT r; RECT r;
ATOM cl; ATOM cl;
int wx = CW_USEDEFAULT;
int wy = CW_USEDEFAULT;
int mode = (int)arg;
SetThreadName("GDI Events"); SetThreadName("GDI Events");
if (mode == CIOLIB_MODE_GDI_FULLSCREEN)
fullscreen = true;
wc.style = CS_HREDRAW | CS_VREDRAW; wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = gdi_WndProc; wc.lpfnWndProc = gdi_WndProc;
// This is actually required or the link will fail (it can be overwritten though) // This is actually required or the link will fail (it can be overwritten though)
...@@ -797,6 +831,13 @@ gdi_thread(void *arg) ...@@ -797,6 +831,13 @@ gdi_thread(void *arg)
pthread_mutex_lock(&vstatlock); pthread_mutex_lock(&vstatlock);
if (ciolib_initial_scaling != 0) { if (ciolib_initial_scaling != 0) {
bitmap_get_scaled_win_size(ciolib_initial_scaling, &vstat.winwidth, &vstat.winheight, 0, 0); bitmap_get_scaled_win_size(ciolib_initial_scaling, &vstat.winwidth, &vstat.winheight, 0, 0);
vstat.scaling = ciolib_initial_scaling;
}
if (fullscreen) {
if (get_monitor_size_pos(&vstat.winwidth, &vstat.winheight, &wx, &wy))
vstat.scaling = bitmap_double_mult_inside(vstat.winwidth, vstat.winheight);
else
fullscreen = false;
} }
stype = ciolib_initial_scaling_type; stype = ciolib_initial_scaling_type;
// Now make the inside of the window the size we want (sigh) // Now make the inside of the window the size we want (sigh)
...@@ -804,12 +845,16 @@ gdi_thread(void *arg) ...@@ -804,12 +845,16 @@ gdi_thread(void *arg)
r.right = vstat.winwidth; r.right = vstat.winwidth;
r.bottom = vstat.winheight; r.bottom = vstat.winheight;
pthread_mutex_unlock(&vstatlock); pthread_mutex_unlock(&vstatlock);
AdjustWindowRect(&r, style, FALSE); AdjustWindowRect(&r, STYLE, FALSE);
win = CreateWindowW(wc.lpszClassName, L"SyncConsole", style, CW_USEDEFAULT, SW_SHOWNORMAL, r.right - r.left, r.bottom - r.top, NULL, NULL, NULL, NULL); win = CreateWindowW(wc.lpszClassName, L"SyncConsole", STYLE, wx, wy, r.right - r.left, r.bottom - r.top, NULL, NULL, NULL, NULL);
if (win == NULL) if (win == NULL)
goto fail; goto fail;
// No failing after this... // No failing after this...
init_success = true; init_success = true;
if (fullscreen)
cio_api.mode = CIOLIB_MODE_GDI_FULLSCREEN;
else
cio_api.mode = CIOLIB_MODE_GDI;
ReleaseSemaphore(init_sem, 1, NULL); ReleaseSemaphore(init_sem, 1, NULL);
while (GetMessage(&msg, NULL, 0, 0)) { while (GetMessage(&msg, NULL, 0, 0)) {
...@@ -875,9 +920,13 @@ gdi_textmode(int mode) ...@@ -875,9 +920,13 @@ gdi_textmode(int mode)
} }
pthread_mutex_lock(&vstatlock); pthread_mutex_lock(&vstatlock);
gdi_get_monitor_size(&mw, &mh); get_monitor_size_pos(&mw, &mh, NULL, NULL);
UnadjustWindowSize(&mw, &mh); UnadjustWindowSize(&mw, &mh);
bitmap_drv_init_mode(mode, NULL, NULL, mw, mh); bitmap_drv_init_mode(mode, NULL, NULL, mw, mh);
if (fullscreen) {
vstat.winwidth = mw;
vstat.winheight = mh;
}
gdi_setwinsize(vstat.winwidth, vstat.winheight); gdi_setwinsize(vstat.winwidth, vstat.winheight);
pthread_mutex_unlock(&vstatlock); pthread_mutex_unlock(&vstatlock);
bitmap_drv_request_pixels(); bitmap_drv_request_pixels();
...@@ -1067,11 +1116,11 @@ gdi_init(int mode) ...@@ -1067,11 +1116,11 @@ gdi_init(int mode)
else if (SetProcessDPIAware) { else if (SetProcessDPIAware) {
SetProcessDPIAware(); SetProcessDPIAware();
} }
_beginthread(gdi_mouse_thread, 0, NULL); _beginthread(gdi_thread, 0, (void *)(intptr_t)mode);
_beginthread(gdi_thread, 0, NULL);
WaitForSingleObject(init_sem, INFINITE); WaitForSingleObject(init_sem, INFINITE);
CloseHandle(init_sem); CloseHandle(init_sem);
if (init_success) { if (init_success) {
_beginthread(gdi_mouse_thread, 0, NULL);
gdi_textmode(ciolib_initial_mode); gdi_textmode(ciolib_initial_mode);
cio_api.mode=CIOLIB_MODE_GDI; cio_api.mode=CIOLIB_MODE_GDI;
...@@ -1158,6 +1207,9 @@ gdi_setwinposition(int x, int y) ...@@ -1158,6 +1207,9 @@ gdi_setwinposition(int x, int y)
void void
gdi_setwinsize(int w, int h) gdi_setwinsize(int w, int h)
{ {
if (fullscreen)
window_scaling = bitmap_double_mult_inside(w, h);
else
PostMessageW(win, WM_USER_SETSIZE, w, h); PostMessageW(win, WM_USER_SETSIZE, w, h);
} }
...@@ -1177,11 +1229,16 @@ gdi_setscaling(double newval) ...@@ -1177,11 +1229,16 @@ gdi_setscaling(double newval)
{ {
int w, h; int w, h;
if (fullscreen) {
window_scaling = newval;
}
else {
pthread_mutex_lock(&vstatlock); pthread_mutex_lock(&vstatlock);
bitmap_get_scaled_win_size(newval, &w, &h, 0, 0); bitmap_get_scaled_win_size(newval, &w, &h, 0, 0);
pthread_mutex_unlock(&vstatlock); pthread_mutex_unlock(&vstatlock);
gdi_setwinsize(w, h); gdi_setwinsize(w, h);
} }
}
enum ciolib_scaling enum ciolib_scaling
gdi_getscaling_type(void) gdi_getscaling_type(void)
......
...@@ -1911,7 +1911,7 @@ change_settings(int connected) ...@@ -1911,7 +1911,7 @@ change_settings(int connected)
#ifdef __unix__ #ifdef __unix__
"~ Curses ~\n" "~ Curses ~\n"
" Use text output using the Curses library. This mode should work\n" " Use text output using the Curses library. This mode should work\n"
" from any terminal, however, high and low ASCII will not work\n" " from any terminal, however, high and low ASCII may not work\n"
" correctly.\n\n" " correctly.\n\n"
"~ Curses on cp437 Device ~\n" "~ Curses on cp437 Device ~\n"
" As above, but assumes that the current terminal is configured to\n" " As above, but assumes that the current terminal is configured to\n"
...@@ -1925,8 +1925,7 @@ change_settings(int connected) ...@@ -1925,8 +1925,7 @@ change_settings(int connected)
#if defined(__unix__) && !defined(NO_X) #if defined(__unix__) && !defined(NO_X)
"~ X11 ~\n" "~ X11 ~\n"
" Uses the Xlib library directly for graphical output. This is\n" " Uses the Xlib library directly for graphical output. This is\n"
" the graphical mode most likely to work when using X11. This\n" " the graphical mode most likely to work when using X11.\n\n"
" mode supports font changes.\n\n"
"~ X11 Fullscreen ~\n" "~ X11 Fullscreen ~\n"
" As above, but starts in full-screen mode rather than a window\n\n" " As above, but starts in full-screen mode rather than a window\n\n"
#endif #endif
...@@ -1936,15 +1935,19 @@ change_settings(int connected) ...@@ -1936,15 +1935,19 @@ change_settings(int connected)
" affect the look of the output and some low ASCII characters are\n" " affect the look of the output and some low ASCII characters are\n"
" not displayable. When in a window, blinking text is displayed\n" " not displayable. When in a window, blinking text is displayed\n"
" with a high-intensity background rather than blinking. In\n" " with a high-intensity background rather than blinking. In\n"
" full-screen mode, blinking works correctly.\n\n" " full-screen mode (where available), blinking works correctly.\n\n"
#endif #endif
#if defined(WITH_SDL) || defined(WITH_SDL_AUDIO) #if defined(WITH_SDL) || defined(WITH_SDL_AUDIO)
"~ SDL ~\n" "~ SDL ~\n"
" Makes use of the SDL graphics library for graphical output.\n" " Makes use of the SDL graphics library for graphical output.\n"
" This output mode allows switching to full-screen mode but is\n"
" otherwise identical to X11 mode.\n\n"
"~ SDL Fullscreen ~\n" "~ SDL Fullscreen ~\n"
" As above, but starts in full-screen mode rather than a window\n\n" " As above, but starts in full-screen mode rather than a window\n\n"
#endif
#if defined(WITH_GDI)
"~ GDI ~\n"
" Native Windows graphics library for graphical output.\n"
"~ GDI Fullscreen ~\n"
" As above, but starts in full-screen mode rather than a window\n\n"
#endif #endif
; ;
switch (i = uifc.list(WIN_SAV, 0, 0, 0, &j, NULL, "Video Output Mode", output_types)) { switch (i = uifc.list(WIN_SAV, 0, 0, 0, &j, NULL, "Video Output Mode", output_types)) {
......
...@@ -101,17 +101,18 @@ char *usage = ...@@ -101,17 +101,18 @@ char *usage =
"-e# = set escape delay to #msec\n" "-e# = set escape delay to #msec\n"
"-h = use SSH mode if URL does not include the scheme\n" "-h = use SSH mode if URL does not include the scheme\n"
"-iX = set interface mode to X (default=auto) where X is one of:\n" "-iX = set interface mode to X (default=auto) where X is one of:\n"
" S[W|F] = SDL surface mode W for windowed and F for fullscreen\n" " A = ANSI mode\n"
#ifdef __unix__ #ifdef __unix__
" X[W|F] = X11 mode W for windowed and F for fullscreen\n"
" C = Curses mode\n" " C = Curses mode\n"
" I = Curses mode with forced ASCII charset\n"
" F = Curses mode with forced IBM charset\n" " F = Curses mode with forced IBM charset\n"
" I = Curses mode with forced ASCII charset\n"
" S[W|F] = SDL surface mode W for windowed and F for fullscreen\n"
" X[W|F] = X11 mode W for windowed and F for fullscreen\n"
#else #else
" G[W|F] = Win32 GDI (graphics) mode W for windowed and F for fullscreen\n"
" S[W|F] = SDL surface mode W for windowed and F for fullscreen\n"
" W = Win32 console (text) mode\n" " W = Win32 console (text) mode\n"
" G = Win32 GDI (graphics) mode\n"
#endif #endif
" A = ANSI mode\n"
"-l# = set screen lines to # (default=auto-detect)\n" "-l# = set screen lines to # (default=auto-detect)\n"
"-n/path/to/ini = specify a config ini path\n" "-n/path/to/ini = specify a config ini path\n"
"-q = Quiet mode (Hide various popups such as this during a connect)\n" "-q = Quiet mode (Hide various popups such as this during a connect)\n"
...@@ -771,15 +772,16 @@ char *output_types[] = { ...@@ -771,15 +772,16 @@ char *output_types[] = {
#endif #endif
#if defined(WITH_GDI) #if defined(WITH_GDI)
, "GDI" , "GDI"
, "GDI Fullscreen"
#endif #endif
, NULL , NULL
}; };
int output_map[] = { int output_map[] = {
CIOLIB_MODE_AUTO CIOLIB_MODE_AUTO
#ifdef __unix__ #ifdef __unix__
, CIOLIB_MODE_CURSES, , CIOLIB_MODE_CURSES
CIOLIB_MODE_CURSES_IBM, , CIOLIB_MODE_CURSES_IBM
CIOLIB_MODE_CURSES_ASCII , CIOLIB_MODE_CURSES_ASCII
#endif #endif
, CIOLIB_MODE_ANSI , CIOLIB_MODE_ANSI
#if defined(__unix__) && !defined(NO_X) #if defined(__unix__) && !defined(NO_X)
...@@ -787,16 +789,16 @@ int output_map[] = { ...@@ -787,16 +789,16 @@ int output_map[] = {
, CIOLIB_MODE_X_FULLSCREEN , CIOLIB_MODE_X_FULLSCREEN
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
, CIOLIB_MODE_CONIO, , CIOLIB_MODE_CONIO
CIOLIB_MODE_CONIO_FULLSCREEN , CIOLIB_MODE_CONIO_FULLSCREEN
#endif #endif
#if defined(WITH_SDL) || defined(WITH_SDL_AUDIO) #if defined(WITH_SDL) || defined(WITH_SDL_AUDIO)
, CIOLIB_MODE_SDL, , CIOLIB_MODE_SDL
CIOLIB_MODE_SDL_FULLSCREEN , CIOLIB_MODE_SDL_FULLSCREEN
#endif #endif
#ifdef WITH_GDI #ifdef WITH_GDI
, CIOLIB_MODE_GDI, , CIOLIB_MODE_GDI
CIOLIB_MODE_GDI , CIOLIB_MODE_GDI_FULLSCREEN
#endif #endif
, 0 , 0
}; };
...@@ -813,6 +815,7 @@ char *output_descrs[] = { ...@@ -813,6 +815,7 @@ char *output_descrs[] = {
"SDL", "SDL",
"SDL Fullscreen", "SDL Fullscreen",
"GDI", "GDI",
"GDI Fullscreen",
NULL NULL
}; };
...@@ -829,6 +832,7 @@ char *output_enum[] = { ...@@ -829,6 +832,7 @@ char *output_enum[] = {
"SDL", "SDL",
"SDLFullscreen", "SDLFullscreen",
"GDI", "GDI",
"GDIFullscreen",
NULL NULL
}; };
...@@ -1626,8 +1630,16 @@ main(int argc, char **argv) ...@@ -1626,8 +1630,16 @@ main(int argc, char **argv)
ciolib_mode = CIOLIB_MODE_CURSES_IBM; ciolib_mode = CIOLIB_MODE_CURSES_IBM;
break; break;
case 'G': case 'G':
switch (toupper(argv[i][3])) {
case 0:
case 'W':
ciolib_mode = CIOLIB_MODE_GDI; ciolib_mode = CIOLIB_MODE_GDI;
break; break;
case 'F':
ciolib_mode = CIOLIB_MODE_GDI_FULLSCREEN;
break;
}
break;
case 'I': case 'I':
ciolib_mode = CIOLIB_MODE_CURSES_ASCII; ciolib_mode = CIOLIB_MODE_CURSES_ASCII;
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment