Add a function to test whether the current thread is the main thread.

This commit is contained in:
Jonathan G Rennison
2016-02-16 19:53:22 +00:00
parent 48e4c35fdc
commit e89efa8581
7 changed files with 48 additions and 0 deletions

View File

@@ -63,6 +63,7 @@
#include "subsidy_func.h"
#include "gfx_layout.h"
#include "viewport_sprite_sorter.h"
#include "thread/thread.h"
#include "linkgraph/linkgraphschedule.h"
@@ -553,6 +554,7 @@ static const OptionData _options[] = {
*/
int openttd_main(int argc, char *argv[])
{
SetSelfAsMainThread();
char *musicdriver = NULL;
char *sounddriver = NULL;
char *videodriver = NULL;