removed fullscreen menu toggle - does not work on any arch and hasn't since we have toggle in resolution menu
This commit is contained in:
parent
f1706cf2ec
commit
9842dfe1b6
|
@ -61,27 +61,6 @@ int gr_toggle_fullscreen(void){
|
||||||
return ogl_fullscreen;
|
return ogl_fullscreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
int arch_toggle_fullscreen_menu(void){
|
|
||||||
unsigned char *buf=NULL;
|
|
||||||
|
|
||||||
if (ogl_readpixels_ok){
|
|
||||||
MALLOC(buf,unsigned char,grd_curscreen->sc_w*grd_curscreen->sc_h*3);
|
|
||||||
glReadBuffer(GL_FRONT);
|
|
||||||
glReadPixels(0,0,grd_curscreen->sc_w,grd_curscreen->sc_h,GL_RGB,GL_UNSIGNED_BYTE,buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
gr_do_fullscreen(!ogl_fullscreen);
|
|
||||||
|
|
||||||
if (ogl_readpixels_ok){
|
|
||||||
glRasterPos2f(0,0);
|
|
||||||
glDrawPixels(grd_curscreen->sc_w,grd_curscreen->sc_h,GL_RGB,GL_UNSIGNED_BYTE,buf);
|
|
||||||
free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ogl_fullscreen;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ogl_init_state(void){
|
void ogl_init_state(void){
|
||||||
/* select clearing (background) color */
|
/* select clearing (background) color */
|
||||||
glClearColor(0.0, 0.0, 0.0, 0.0);
|
glClearColor(0.0, 0.0, 0.0, 0.0);
|
||||||
|
|
|
@ -772,11 +772,5 @@ int gr_check_fullscreen(void);//must return 0 if windowed, 1 if fullscreen
|
||||||
int gr_toggle_fullscreen(void);//returns state after toggling (ie, same as if you had called check_fullscreen immediatly after)
|
int gr_toggle_fullscreen(void);//returns state after toggling (ie, same as if you had called check_fullscreen immediatly after)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//currently only OGL can toggle in the menus, because its screen data is not used (and stays in the same place). whereas software modes, toggling fullscreen would very likely make the data buffer point to a different location, and all the subbitmaps of it would have invalid addresses in them.
|
|
||||||
#if (defined(OGL) && !defined(__WINDOWS__))
|
|
||||||
#define GR_SUPPORTS_FULLSCREEN_MENU_TOGGLE
|
|
||||||
#endif
|
|
||||||
int gr_toggle_fullscreen_menu(void);//returns state after toggling (ie, same as if you had called check_fullscreen immediatly after)
|
|
||||||
|
|
||||||
//make this a define, since its used in several places
|
//make this a define, since its used in several places
|
||||||
#define KEYS_GR_TOGGLE_FULLSCREEN KEY_CTRLED+KEY_SHIFTED+KEY_PADENTER: case KEY_ALTED+KEY_CTRLED+KEY_PADENTER: case KEY_ALTED+KEY_SHIFTED+KEY_PADENTER: case KEY_ALTED+KEY_ENTER
|
#define KEYS_GR_TOGGLE_FULLSCREEN KEY_CTRLED+KEY_SHIFTED+KEY_PADENTER: case KEY_ALTED+KEY_CTRLED+KEY_PADENTER: case KEY_ALTED+KEY_SHIFTED+KEY_PADENTER: case KEY_ALTED+KEY_ENTER
|
||||||
|
|
17
main/game.c
17
main/game.c
|
@ -834,23 +834,6 @@ int gr_toggle_fullscreen_game(void) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int arch_toggle_fullscreen_menu(void);
|
|
||||||
|
|
||||||
int gr_toggle_fullscreen_menu(void){
|
|
||||||
#ifdef GR_SUPPORTS_FULLSCREEN_MENU_TOGGLE
|
|
||||||
int i;
|
|
||||||
i=arch_toggle_fullscreen_menu();
|
|
||||||
|
|
||||||
generic_key_handler(KEY_PADENTER,0);
|
|
||||||
generic_key_handler(KEY_ENTER,0);
|
|
||||||
key_flush();
|
|
||||||
|
|
||||||
return i;
|
|
||||||
#else
|
|
||||||
return -1;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
fix frame_time_list[8] = {0,0,0,0,0,0,0,0};
|
fix frame_time_list[8] = {0,0,0,0,0,0,0,0};
|
||||||
fix frame_time_total=0;
|
fix frame_time_total=0;
|
||||||
int frame_time_cntr=0;
|
int frame_time_cntr=0;
|
||||||
|
|
|
@ -687,9 +687,6 @@ int network_join_game_menu() {
|
||||||
selected_game = -1;
|
selected_game = -1;
|
||||||
done = 1;
|
done = 1;
|
||||||
break;
|
break;
|
||||||
case KEYS_GR_TOGGLE_FULLSCREEN:
|
|
||||||
gr_toggle_fullscreen_menu();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
done_background(&bg);
|
done_background(&bg);
|
||||||
|
|
|
@ -1028,10 +1028,6 @@ int newmenu_do3_real( char * title, char * subtitle, int nitems, newmenu_item *
|
||||||
|
|
||||||
case KEY_PRINT_SCREEN: save_screen_shot(0); break;
|
case KEY_PRINT_SCREEN: save_screen_shot(0); break;
|
||||||
|
|
||||||
case KEYS_GR_TOGGLE_FULLSCREEN:
|
|
||||||
gr_toggle_fullscreen_menu();
|
|
||||||
break;
|
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
case KEY_BACKSP:
|
case KEY_BACKSP:
|
||||||
if ( (choice>-1) && (item[choice].type!=NM_TYPE_INPUT)&&(item[choice].type!=NM_TYPE_INPUT_MENU))
|
if ( (choice>-1) && (item[choice].type!=NM_TYPE_INPUT)&&(item[choice].type!=NM_TYPE_INPUT_MENU))
|
||||||
|
@ -1743,10 +1739,6 @@ ReadFileNames:
|
||||||
done = 1;
|
done = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KEYS_GR_TOGGLE_FULLSCREEN:
|
|
||||||
gr_toggle_fullscreen_menu();
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
int ascii = key_to_ascii(key);
|
int ascii = key_to_ascii(key);
|
||||||
|
@ -2094,10 +2086,6 @@ int newmenu_listbox1( char * title, int nitems, char * items[], int allow_abort_
|
||||||
done = 1;
|
done = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KEYS_GR_TOGGLE_FULLSCREEN:
|
|
||||||
gr_toggle_fullscreen_menu();
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if ( key > 0 ) {
|
if ( key > 0 ) {
|
||||||
int ascii = key_to_ascii(key);
|
int ascii = key_to_ascii(key);
|
||||||
|
|
Loading…
Reference in a new issue