-
- switch(selected){
- case 0: {
- extern SDL_Rect **resolutions;
- bool isCustomResolution = true;
- bool found = false;
- for(int i = 0; (!found) && (resolutions[i]); i++){
- if((resolutions[i]->w == screenwidth) && (resolutions[i]->h == screenwidth))
- isCustomResolution = false;
-
- if((resolutions[i]->w == newscreenwidth) && (resolutions[i]->h == newscreenheight)){
- i++;
- if(resolutions[i] != NULL){
- newscreenwidth = (int) resolutions[i]->w;
- newscreenheight = (int) resolutions[i]->h;
- }else if(isCustomResolution){
- if((screenwidth == newscreenwidth) && (screenheight == newscreenheight)){
+ flash();
+ if(gameon){
+ //end game
+ gameon=0;
+ mainmenu=1;
+ }else{
+ //quit
+ tryquit=1;
+ pause_sound(stream_music3);
+ }
+ }
+ break;
+ case 3:
+ if(Input::MouseClicked()){
+
+ if(selected!=-1)
+ fireSound();
+
+ switch(selected){
+ case 0: {
+ extern SDL_Rect **resolutions;
+ bool isCustomResolution = true;
+ bool found = false;
+ for(int i = 0; (!found) && (resolutions[i]); i++){
+ if((resolutions[i]->w == screenwidth) && (resolutions[i]->h == screenwidth))
+ isCustomResolution = false;
+
+ if((resolutions[i]->w == newscreenwidth) && (resolutions[i]->h == newscreenheight)){
+ i++;
+ if(resolutions[i] != NULL){
+ newscreenwidth = (int) resolutions[i]->w;
+ newscreenheight = (int) resolutions[i]->h;
+ }else if(isCustomResolution){
+ if((screenwidth == newscreenwidth) && (screenheight == newscreenheight)){
+ newscreenwidth = (int) resolutions[0]->w;
+ newscreenheight = (int) resolutions[0]->h;
+ }else{
+ newscreenwidth = screenwidth;
+ newscreenheight = screenheight;
+ }
+ }else{