The emulator now tries to initialize the other renderer if the specified one fails, and only fatals if both fail to initialize;

On Windows, fatal now displays a message box, based on old PCem-X patch by RichardG;
Added emulation of the 287, 387, and 487SX floating point units and an option to enable them.
This commit is contained in:
OBattler
2017-02-21 01:18:46 +01:00
parent af03793533
commit 86d1b0f1eb
17 changed files with 695 additions and 40 deletions

View File

@@ -61,7 +61,7 @@ static uint16_t scancode_map[65536];
static struct
{
void (*init)(HWND h);
int (*init)(HWND h);
void (*close)();
void (*resize)(int x, int y);
} vid_apis[2][2] =
@@ -649,7 +649,17 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
initpc(argc, argv);
// pclog("Setting video API...\n");
vid_apis[0][vid_api].init(ghwnd);
if (vid_apis[0][vid_api].init(ghwnd) == 0)
{
if (vid_apis[0][vid_api ^ 1].init(ghwnd) == 0)
{
fatal("Both DirectDraw and Direct3D renderers failed to initialize\n");
}
else
{
vid_api ^= 1;
}
}
// pclog("Resizing window...\n");
if (vid_resize) SetWindowLong(hwnd, GWL_STYLE, WS_OVERLAPPEDWINDOW|WS_VISIBLE);