Skip to content

Commit b4fe897

Browse files
committed
Set editor loaded flag on error to hide splash screen
1 parent 5a9fd7c commit b4fe897

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

standalone/pyunity-editor.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
#define PY_SSIZE_T_CLEAN
22
#define Py_LIMITED_API 0x03060000
33
#include <Python.h>
4+
#include <stdlib.h>
45

56
#ifdef NOCONSOLE
67
#include <windows.h>
78
#define CHECK_ERROR() if (PyErr_Occurred() != NULL) { showError(); exit(1); }
89

910
void showError() {
1011
printf("Error encountered\n");
12+
setenv("PYUNITY_EDITOR_LOADED", "1", 1);
1113
PyObject *type, *value, *traceback;
1214
PyErr_Fetch(&type, &value, &traceback);
1315
PyErr_Print();

0 commit comments

Comments
 (0)