Fix macOS client/server failing to start from terminal

The macOS client and server were completely unusable when run from a
terminal. They blocked forever in `[NSApp run];` which was called by
Sys_InitProtocolHandler(). `applicationDidFinishLaunching` was never
called to exit the NSApp run loop.

Use SDL's SDL_DROPFILE event to receive URLs to handle on macOS instead.
This also handles URLs while the game is running (connect to new server)
instead of nothing happening when clicking a link while the game is
running.
This commit is contained in:
Zack Middleton authored and Turtle Man ♣ committed 2023-06-11 11:05:13 -04:00
1 parent 8b6333fbd3
commit e452b7ac04
4 files changed
+29 -64

No files matched your search

-1
View File
@@ -66,6 +66,5 @@ int Sys_PID( void );
qboolean Sys_PIDIsRunning( int pid );
#ifdef PROTOCOL_HANDLER
char *Sys_InitProtocolHandler( void );
char *Sys_ParseProtocolUri( const char *uri );
#endif