Skip to content
Snippets Groups Projects
Commit c220448a authored by deuce's avatar deuce
Browse files

Support specifying full-screen mode at init.

parent b5af4a9f
No related branches found
No related tags found
No related merge requests found
......@@ -105,8 +105,8 @@ char *ciolib_getcliptext(void);
#ifdef WITH_SDL
int try_sdl_init(int mode)
{
if(!sdl_init()) {
cio_api.mode=CIOLIB_MODE_SDL;
if(!sdl_init(mode)) {
cio_api.mode=mode;
cio_api.mouse=1;
cio_api.puttext=sdl_puttext;
cio_api.gettext=sdl_gettext;
......@@ -297,6 +297,7 @@ int initciolib(int mode)
#ifdef WITH_SDL
case CIOLIB_MODE_SDL:
case CIOLIB_MODE_SDL_FULLSCREEN:
try_sdl_init(mode);
break;
#endif
......
......@@ -45,6 +45,7 @@ enum {
,CIOLIB_MODE_X
,CIOLIB_MODE_CONIO
,CIOLIB_MODE_SDL
,CIOLIB_MODE_SDL_FULLSCREEN
};
#if defined(_WIN32) /* presumably, Win32 */
......
......@@ -273,13 +273,16 @@ int sdl_draw_char(unsigned short vch, int xpos, int ypos, int update)
}
/* Called from main thread only (Passes Event) */
int sdl_init(void)
int sdl_init(int mode)
{
vstat.vmem=NULL;
vstat.scaling=1;
sdl_updated=1;
if(mode==CIOLIB_MODE_SDL_FULLSCREEN)
fullscreen=1;
sdl_init_mode(3);
atexit(SDL_Quit);
......
......@@ -5,7 +5,7 @@
extern "C" {
#endif
/* Low-Level stuff (Shouldn't be used by ciolib programs */
int sdl_init(void);
int sdl_init(int mode);
int sdl_load_font(char *filename, int width, int height, double scale);
int sdl_init_mode(int mode);
int sdl_setup_colours(void);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment