Move */arch/win32/messagebox.c -> common/arch/win32/messagebox.c
This commit is contained in:
parent
ccd65b83ae
commit
504cf23746
|
@ -297,7 +297,7 @@ class DXXProgram(DXXCommon):
|
|||
DXXCommon.Win32PlatformSettings.adjust_environment(self, program, env)
|
||||
env.RES('arch/win32/%s.rc' % program.target)
|
||||
env.Append(CPPPATH = [os.path.join(self.srcdir, 'arch/win32/include')])
|
||||
self.platform_sources = [os.path.join(program.srcdir, 'arch/win32/messagebox.c')]
|
||||
self.platform_sources = ['common/arch/win32/messagebox.c']
|
||||
# Settings to apply to Apple builds
|
||||
# This appears to be unused. The reference to sdl_only fails to
|
||||
# execute.
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
* messagebox.c
|
||||
* d1x-rebirth
|
||||
*
|
||||
* Display an error or warning messagebox using the OS's window server.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include "window.h"
|
||||
#include "event.h"
|
||||
#include "messagebox.h"
|
||||
|
||||
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 (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)
|
||||
{
|
||||
display_win32_alert(message, 0);
|
||||
}
|
||||
|
||||
void msgbox_error(char *message)
|
||||
{
|
||||
display_win32_alert(message, 1);
|
||||
}
|
Loading…
Reference in a new issue