Support for opening saves/scenarios in Windows by dropping them on the app icon

This commit is contained in:
2015-06-08 21:27:19 -04:00
committed by Celtic Minstrel
parent 2b7e754fdc
commit 459c68a668
11 changed files with 77 additions and 21 deletions

View File

@@ -312,3 +312,25 @@ LRESULT CALLBACK menuProc(HWND handle, UINT message, WPARAM wParam, LPARAM lPara
}
return CallWindowProc(reinterpret_cast<WNDPROC>(mainProc), handle, message, wParam, lParam);
}
#include "fileio.hpp"
#include "boe.graphics.hpp"
#include "boe.actions.hpp"
#include "boe.fileio.hpp"
extern bool ae_loading, finished_init, startup_loaded;
void set_up_apple_events(int argc, char* argv[]) {
if(argc > 1) {
if(!load_party(argv[1], univ))
return;
if(!finished_init) {
ae_loading = true;
overall_mode = MODE_STARTUP;
} else finish_load_party();
if(overall_mode != MODE_STARTUP && startup_loaded)
end_startup();
if(overall_mode != MODE_STARTUP)
post_load();
}
}