remove args and windows logic from all set_up_apple_events
This commit is contained in:
@@ -23,8 +23,8 @@ extern fs::path file_in_mem;
|
||||
-(NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*) sender;
|
||||
@end
|
||||
|
||||
void set_up_apple_events(int argc, char* argv[]); // Suppress "no prototype" warning
|
||||
void set_up_apple_events(int, char*[]) {
|
||||
void set_up_apple_events(); // Suppress "no prototype" warning
|
||||
void set_up_apple_events() {
|
||||
AppleEventHandler* aeHandler = [[AppleEventHandler alloc] init];
|
||||
[[NSApplication sharedApplication] setDelegate: aeHandler];
|
||||
}
|
||||
|
@@ -69,7 +69,7 @@ void Mouse_Pressed(const sf::Event&);
|
||||
void adjust_window(sf::RenderWindow&, sf::View&);
|
||||
sf::FloatRect compute_viewport(const sf::RenderWindow&, float ui_scale);
|
||||
bool verify_restore_quit(std::string dlog);
|
||||
void set_up_apple_events(int argc, char* argv[]);
|
||||
void set_up_apple_events();
|
||||
|
||||
void pick_preferences();
|
||||
void save_prefs();
|
||||
@@ -101,7 +101,7 @@ int main(int argc, char* argv[]) {
|
||||
check_for_intel();
|
||||
srand(time(nullptr));
|
||||
|
||||
set_up_apple_events(argc, argv);
|
||||
set_up_apple_events();
|
||||
|
||||
cDialog::init();
|
||||
redraw_screen();
|
||||
|
@@ -27,5 +27,5 @@ void drawMenuBar() {
|
||||
menu_ptr->draw();
|
||||
}
|
||||
|
||||
void set_up_apple_events(int argc, char* argv[]) {
|
||||
void set_up_apple_events() {
|
||||
}
|
||||
|
@@ -153,19 +153,5 @@ bool menuBarProcessEvent(const sf::Event&) {
|
||||
void drawMenuBar() {
|
||||
}
|
||||
|
||||
#include "fileio.hpp"
|
||||
#include "pc.fileio.hpp"
|
||||
|
||||
extern bool party_in_scen, scen_items_loaded;
|
||||
extern fs::path file_in_mem;
|
||||
void set_up_apple_events(int argc, char* argv[]) {
|
||||
if(argc > 1) {
|
||||
if(load_party(argv[1], univ)) {
|
||||
file_in_mem = argv[1];
|
||||
party_in_scen = !univ.party.scen_name.empty();
|
||||
if(!party_in_scen) load_base_item_defs();
|
||||
scen_items_loaded = true;
|
||||
menu_activate();
|
||||
}
|
||||
}
|
||||
void set_up_apple_events() {
|
||||
}
|
||||
|
Reference in New Issue
Block a user