File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,12 @@ extern "C" {
265
265
#include "SDL_utils_c.h"
266
266
#include "SDL_hashtable.h"
267
267
268
+ #define PUSH_SDL_ERROR () \
269
+ { char *_error = SDL_strdup(SDL_GetError());
270
+
271
+ #define POP_SDL_ERROR () \
272
+ SDL_SetError("%s", _error); SDL_free(_error); }
273
+
268
274
// Do any initialization that needs to happen before threads are started
269
275
extern void SDL_InitMainThread (void );
270
276
Original file line number Diff line number Diff line change @@ -2524,7 +2524,9 @@ SDL_Window *SDL_CreateWindowWithProperties(SDL_PropertiesID props)
2524
2524
SDL_UpdateWindowHierarchy (window , parent );
2525
2525
2526
2526
if (_this -> CreateSDLWindow && !_this -> CreateSDLWindow (_this , window , props )) {
2527
+ PUSH_SDL_ERROR ()
2527
2528
SDL_DestroyWindow (window );
2529
+ POP_SDL_ERROR ()
2528
2530
return NULL ;
2529
2531
}
2530
2532
You can’t perform that action at this time.
0 commit comments