If there's a messagebox to show on exit, and we *were* in fullscreen, don't try to toggle fullscreen and crash
This commit is contained in:
parent
fc1108e7b6
commit
1eb70135fe
|
@ -4,6 +4,7 @@ D1X-Rebirth Changelog
|
|||
--------
|
||||
arch/carbon/conf.h: Used new D1XMAJORi / D1XMINORi / D1XMICROi version constants for Mac
|
||||
main/inferno.h, main/mission.c, main/mission.h: Increased the maximum number of levels and secret levels per mission to 127 each, using MALLOC'd arrays; defined 'd_fname' type (mainly for my pointers to arrays of 13 character filenames, but could be convenient elsewhere)
|
||||
arch/carbon/messagebox.c, arch/win32/messagebox.c: If there's a messagebox to show on exit, and we *were* in fullscreen, don't try to toggle fullscreen and crash
|
||||
|
||||
20130108
|
||||
--------
|
||||
|
|
|
@ -29,7 +29,7 @@ void display_mac_alert(char *message, int error)
|
|||
if ((wind = window_get_front()))
|
||||
WINDOW_SEND_EVENT(wind, EVENT_WINDOW_DEACTIVATED);
|
||||
|
||||
if ((fullscreen = gr_check_fullscreen()))
|
||||
if (grd_curscreen && (fullscreen = gr_check_fullscreen()))
|
||||
gr_toggle_fullscreen();
|
||||
|
||||
osX = ( Gestalt(gestaltSystemVersion, (long *) &response) == noErr)
|
||||
|
@ -76,7 +76,7 @@ void display_mac_alert(char *message, int error)
|
|||
if ((wind = window_get_front()))
|
||||
WINDOW_SEND_EVENT(wind, EVENT_WINDOW_ACTIVATED);
|
||||
|
||||
if (!error && fullscreen)
|
||||
if (grd_curscreen && !error && fullscreen)
|
||||
gr_toggle_fullscreen();
|
||||
}
|
||||
|
||||
|
|
|
@ -15,18 +15,22 @@ void display_win32_alert(char *message, int error)
|
|||
{
|
||||
d_event event;
|
||||
window *wind;
|
||||
int fullscreen;
|
||||
|
||||
// Handle Descent's windows properly
|
||||
if ((wind = window_get_front()))
|
||||
WINDOW_SEND_EVENT(wind, EVENT_WINDOW_DEACTIVATED);
|
||||
|
||||
if (gr_check_fullscreen())
|
||||
if (grd_curscreen && (fullscreen = gr_check_fullscreen()))
|
||||
gr_toggle_fullscreen();
|
||||
|
||||
MessageBox(NULL, message, error?"Sorry, a critical error has occurred.":"Attention!", error?MB_OK|MB_ICONERROR:MB_OK|MB_ICONWARNING);
|
||||
|
||||
if ((wind = window_get_front()))
|
||||
WINDOW_SEND_EVENT(wind, EVENT_WINDOW_ACTIVATED);
|
||||
|
||||
if (grd_curscreen && !error && fullscreen)
|
||||
gr_toggle_fullscreen();
|
||||
}
|
||||
|
||||
void msgbox_warning(char *message)
|
||||
|
|
|
@ -25,8 +25,8 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
#include "inferno.h"
|
||||
|
||||
#define MAX_MISSIONS 5000 // ZICO - changed from 300 to get more levels in list
|
||||
#define MAX_LEVELS_PER_MISSION 127 // KREATOR - increased from 30 (e.g. Total Domain has 57)
|
||||
#define MAX_SECRET_LEVELS_PER_MISSION 127 // KREATOR - increased from 6
|
||||
#define MAX_LEVELS_PER_MISSION 127 // KREATOR - increased from 30 (limited by Demo and Multiplayer code)
|
||||
#define MAX_SECRET_LEVELS_PER_MISSION 127 // KREATOR - increased from 6 (limited by Demo and Multiplayer code)
|
||||
#define MISSION_NAME_LEN 25
|
||||
|
||||
#define D1_MISSION_FILENAME ""
|
||||
|
|
Loading…
Reference in a new issue