Test: Add upstream tests
This commit is contained in:
@@ -52,11 +52,6 @@
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
# if defined(WITH_SDL)
|
||||
/* the mac implementation needs this file included in the same file as main() */
|
||||
# include <SDL.h>
|
||||
# endif
|
||||
|
||||
# include "../macosx/macos.h"
|
||||
#endif
|
||||
|
||||
@@ -229,40 +224,6 @@ void NORETURN DoOSAbort()
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_COCOA
|
||||
void CocoaSetupAutoreleasePool();
|
||||
void CocoaReleaseAutoreleasePool();
|
||||
#endif
|
||||
|
||||
int CDECL main(int argc, char *argv[])
|
||||
{
|
||||
/* Make sure our arguments contain only valid UTF-8 characters. */
|
||||
for (int i = 0; i < argc; i++) StrMakeValidInPlace(argv[i]);
|
||||
|
||||
#ifdef WITH_COCOA
|
||||
CocoaSetupAutoreleasePool();
|
||||
/* This is passed if we are launched by double-clicking */
|
||||
if (argc >= 2 && strncmp(argv[1], "-psn", 4) == 0) {
|
||||
argv[1] = nullptr;
|
||||
argc = 1;
|
||||
}
|
||||
#endif
|
||||
PerThreadSetupInit();
|
||||
CrashLog::InitialiseCrashLog();
|
||||
|
||||
SetRandomSeed(time(nullptr));
|
||||
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
||||
int ret = openttd_main(argc, argv);
|
||||
|
||||
#ifdef WITH_COCOA
|
||||
CocoaReleaseAutoreleasePool();
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifndef WITH_COCOA
|
||||
std::optional<std::string> GetClipboardContents()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user