Moved the call to pc_init_modules() once again to before the renderer API is initializes, fixes Eradicator when 86Box is started with the renderer set to Direct3D;

Added some sanity checks to both the DirectDraw and Direct3D code.
This commit is contained in:
OBattler
2017-12-15 03:40:36 +01:00
parent 356a481f73
commit 1fc459b8b9
3 changed files with 21 additions and 19 deletions

View File

@@ -8,7 +8,7 @@
*
* user Interface module for WinAPI on Windows.
*
* Version: @(#)win_ui.c 1.0.7 2017/12/09
* Version: @(#)win_ui.c 1.0.8 2017/12/15
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -756,6 +756,16 @@ ui_init(int nCmdShow)
0, 0, 1, 1, hwnd, NULL, hinstance, NULL);
MoveWindow(hwndRender, 0, 0, scrnsz_x, scrnsz_y, TRUE);
/* All done, fire up the actual emulated machine. */
if (! pc_init_modules()) {
/* Dang, no ROMs found at all! */
MessageBox(hwnd,
plat_get_string(IDS_2056),
plat_get_string(IDS_2050),
MB_OK | MB_ICONERROR);
return(6);
}
/* Initialize the configured Video API. */
if (! plat_setvid(vid_api)) {
MessageBox(hwnd,
@@ -772,16 +782,6 @@ ui_init(int nCmdShow)
/* Set up the current window size. */
plat_resize(scrnsz_x, scrnsz_y);
/* All done, fire up the actual emulated machine. */
if (! pc_init_modules()) {
/* Dang, no ROMs found at all! */
MessageBox(hwnd,
plat_get_string(IDS_2056),
plat_get_string(IDS_2050),
MB_OK | MB_ICONERROR);
return(6);
}
/* Fire up the machine. */
pc_reset_hard();