Fix crash screen on DirectX
This commit is contained in:
parent
0a54b7ebed
commit
bb12aebb9e
|
@ -1 +1 @@
|
|||
make RENDER_API=D3D12 WINDOW_API=DXGI BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 DEVELOPMENT=1 && ./build/us_pc/sm64.us.f3dex2e.exe
|
||||
make RENDER_API=D3D11 WINDOW_API=DXGI BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 DEVELOPMENT=1 && ./build/us_pc/sm64.us.f3dex2e.exe
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
// Adapted from PeachyPeach's sm64pc-omm
|
||||
|
||||
#if defined(_WIN32)
|
||||
#if defined(_WIN32) && !defined(WAPI_DUMMY)
|
||||
|
||||
#ifdef HAVE_SDL2
|
||||
#include <SDL2/SDL.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#include <dbghelp.h>
|
||||
|
@ -462,6 +465,7 @@ static CRASH_HANDLER_TYPE crash_handler(EXCEPTION_POINTERS *ExceptionInfo) {
|
|||
}
|
||||
|
||||
// sounds
|
||||
#ifdef HAVE_SDL2
|
||||
if (SDL_WasInit(SDL_INIT_AUDIO) || SDL_InitSubSystem(SDL_INIT_AUDIO) == 0) {
|
||||
SDL_AudioSpec want, have;
|
||||
want.freq = 32000;
|
||||
|
@ -475,6 +479,7 @@ static CRASH_HANDLER_TYPE crash_handler(EXCEPTION_POINTERS *ExceptionInfo) {
|
|||
SDL_PauseAudioDevice(device, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Main loop
|
||||
while (true) {
|
||||
|
@ -492,4 +497,3 @@ __attribute__((constructor)) static void init_crash_handler() {
|
|||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue