diff --git a/glide2x/h3/glide/src/diglide.c b/glide2x/h3/glide/src/diglide.c index d1c7cfc..4c7d149 100644 --- a/glide2x/h3/glide/src/diglide.c +++ b/glide2x/h3/glide/src/diglide.c @@ -318,6 +318,13 @@ GR_DIENTRY(grGlideInit, void, (void)) gdbg_error_set_callback(_grErrorCallback); #endif + /* In case of error, _GlideInitEnvironment() calls GrErrorCallback() which is + * supposed to be a noreturn function, but it really is not for non-windows.. + * Eww... */ + if (!_GlideRoot.hwConfig.num_sst) { + return; + } + #if USE_PACKET_FIFO && (WTF_P_COMDEX || WTF_P_COMDEX_RESET) /* Work around for apps that call some grXXX state call * before calling grSstWinOpen which inits the command fifo. diff --git a/glide3x/h3/glide3/src/diglide.c b/glide3x/h3/glide3/src/diglide.c index b3a66cb..9f83be7 100644 --- a/glide3x/h3/glide3/src/diglide.c +++ b/glide3x/h3/glide3/src/diglide.c @@ -351,6 +351,13 @@ GR_DIENTRY(grGlideInit, void, (void)) gdbg_error_set_callback(_grErrorCallback); #endif + /* In case of error, _GlideInitEnvironment() calls GrErrorCallback() which is + * supposed to be a noreturn function, but it really is not for non-windows.. + * Eww... */ + if (!_GlideRoot.hwConfig.num_sst) { + return; + } + if (_GlideRoot.initialized) { initThreadStorage(); initCriticalSection(); diff --git a/glide3x/h5/glide3/src/diglide.c b/glide3x/h5/glide3/src/diglide.c index d33702a..1c1e3c5 100644 --- a/glide3x/h5/glide3/src/diglide.c +++ b/glide3x/h5/glide3/src/diglide.c @@ -353,6 +353,13 @@ GR_DIENTRY(grGlideInit, void, (void)) GDBG_ERROR_SET_CALLBACK(_grErrorCallback); #endif + /* In case of error, _GlideInitEnvironment() calls GrErrorCallback() which is + * supposed to be a noreturn function, but it really is not for non-windows.. + * Eww... */ + if (!_GlideRoot.hwConfig.num_sst) { + return; + } + if (_GlideRoot.initialized) { /* allocate the TLS index */ /* [koolsmoky] According to Microsoft, the TLS index must be allocated