removed fullok hack for fullscreen changing, added set_screen_mode call to prevent black screen at fullscreen toggle in windows build
This commit is contained in:
parent
4124ce33f7
commit
7a26d08501
|
@ -131,7 +131,6 @@ void ogl_init_state(void){
|
|||
}
|
||||
|
||||
int last_screen_mode=-1;
|
||||
extern int fullok;
|
||||
|
||||
void ogl_set_screen_mode(void){
|
||||
if (last_screen_mode==Screen_mode)
|
||||
|
@ -142,11 +141,6 @@ void ogl_set_screen_mode(void){
|
|||
OGL_VIEWPORT(grd_curcanv->cv_bitmap.bm_x,grd_curcanv->cv_bitmap.bm_y,grd_curcanv->cv_bitmap.bm_w,grd_curcanv->cv_bitmap.bm_h); // ZICO - better to use with windows
|
||||
#endif
|
||||
if (Screen_mode==SCREEN_GAME){
|
||||
if (fullok == 1) // ZICO - fullscreen set to on?
|
||||
{
|
||||
fullok=0;
|
||||
gr_toggle_fullscreen(); // ZICO - toggle fullscreen
|
||||
}
|
||||
glDrawBuffer(GL_BACK);
|
||||
}else{
|
||||
glClearColor(0.0, 0.0, 0.0, 0.0);
|
||||
|
|
18
main/menu.c
18
main/menu.c
|
@ -273,7 +273,7 @@ void create_main_menu(newmenu_item *m, int *menu_choice, int *callers_num_option
|
|||
#ifndef DEMO_ONLY
|
||||
num_options = 0;
|
||||
|
||||
set_screen_mode (SCREEN_MENU);
|
||||
// set_screen_mode (SCREEN_MENU);
|
||||
|
||||
ADD_ITEM(TXT_NEW_GAME,MENU_NEW_GAME,KEY_N);
|
||||
|
||||
|
@ -841,10 +841,6 @@ void do_screen_res_menu()
|
|||
|
||||
#else // PC version of do_screen_res_menu is below
|
||||
|
||||
#ifdef OGL
|
||||
int fullok;
|
||||
#endif
|
||||
|
||||
void do_screen_res_menu()
|
||||
{
|
||||
#ifdef GR_SUPPORTS_FULLSCREEN_TOGGLE
|
||||
|
@ -901,12 +897,8 @@ void do_screen_res_menu()
|
|||
|
||||
#ifdef GR_SUPPORTS_FULLSCREEN_TOGGLE
|
||||
if (m[fullscreenc].value != gr_check_fullscreen()){
|
||||
#ifndef OGL
|
||||
gr_toggle_fullscreen();
|
||||
Game_screen_mode = -1;
|
||||
#else
|
||||
fullok=1;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -937,6 +929,7 @@ void do_screen_res_menu()
|
|||
set_display_mode(i);
|
||||
#endif
|
||||
|
||||
set_screen_mode(SCREEN_GAME);
|
||||
}
|
||||
#endif // end of PC version of do_screen_res_menu()
|
||||
|
||||
|
@ -1067,12 +1060,8 @@ void change_res()
|
|||
#ifdef GR_SUPPORTS_FULLSCREEN_TOGGLE
|
||||
if (m[fullscreenc].value != gr_check_fullscreen())
|
||||
{
|
||||
#ifndef OGL
|
||||
gr_toggle_fullscreen();
|
||||
Game_screen_mode = -1;
|
||||
#else
|
||||
fullok=1;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1127,8 +1116,7 @@ void change_res()
|
|||
if (modes[i] != 99)
|
||||
set_display_mode(i);
|
||||
|
||||
if (FindArg("-menu_gameres")) // ZICO - workaround for win32
|
||||
set_screen_mode(SCREEN_GAME);
|
||||
set_screen_mode(SCREEN_GAME);
|
||||
}
|
||||
//End changed section (OE)
|
||||
|
||||
|
|
Loading…
Reference in a new issue