Skip to content

Commit

Permalink
Fix map editor crash in GTK due to not initialising X threads on Linux.
Browse files Browse the repository at this point in the history
Also cleaned up adjacent code formatting
  • Loading branch information
pjbroad committed May 12, 2022
1 parent 2bcff4b commit a53b004
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions map_editor/main.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#ifdef LINUX
#include <X11/Xlib.h>
#endif

#include "tiles.h"
#include "global.h"

Expand Down Expand Up @@ -53,21 +57,21 @@ int start_rendering()

int Main(int argc, char *argv[])
{

//int i
//int logo = 1;
//int i
//int logo = 1;
//int numtests = 1;
//int bpp = 0;
//int slowly = 1;
//float gamma = 0.0;
//int noframe = 1;

#ifdef LINUX
XInitThreads();
gtk_set_locale ();
gtk_init (&argc, &argv);
#endif //LINUX

init_stuff();

start_rendering();

return 0;
Expand Down

0 comments on commit a53b004

Please sign in to comment.