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:
zicodxx 2006-04-14 20:28:12 +00:00
parent d1b641f895
commit d5fdf68832
2 changed files with 1 additions and 14 deletions

View file

@ -110,7 +110,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)
@ -118,11 +117,6 @@ void ogl_set_screen_mode(void){
OGL_VIEWPORT(0,0,grd_curscreen->sc_w,grd_curscreen->sc_h);
// 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);
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);

View file

@ -233,7 +233,6 @@ void create_main_menu(newmenu_item *m, int *menu_choice, int *callers_num_option
set_screen_mode(SCREEN_GAME);
}
ADD_ITEM(TXT_NEW_GAME,MENU_NEW_GAME,KEY_N);
#ifdef SHAREWARE
@ -903,9 +902,6 @@ void change_res_poll()
}
extern int last_drawn_cockpit[2];
#ifdef OGL
int fullok;
#endif
void change_res()
{
@ -959,12 +955,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
@ -1012,6 +1004,7 @@ void change_res()
last_drawn_cockpit[0]=-1;
last_drawn_cockpit[1]=-1;
vr_reset_display();
set_screen_mode(SCREEN_GAME);
}