|
@@ -755,21 +755,25 @@ void OS_MacOS::run() {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- main_loop->initialize();
|
|
|
+ @autoreleasepool {
|
|
|
+ main_loop->initialize();
|
|
|
+ }
|
|
|
|
|
|
bool quit = false;
|
|
|
while (!quit) {
|
|
|
- @try {
|
|
|
- if (DisplayServer::get_singleton()) {
|
|
|
- DisplayServer::get_singleton()->process_events(); // Get rid of pending events.
|
|
|
- }
|
|
|
- joypad_macos->process_joypads();
|
|
|
+ @autoreleasepool {
|
|
|
+ @try {
|
|
|
+ if (DisplayServer::get_singleton()) {
|
|
|
+ DisplayServer::get_singleton()->process_events(); // Get rid of pending events.
|
|
|
+ }
|
|
|
+ joypad_macos->process_joypads();
|
|
|
|
|
|
- if (Main::iteration()) {
|
|
|
- quit = true;
|
|
|
+ if (Main::iteration()) {
|
|
|
+ quit = true;
|
|
|
+ }
|
|
|
+ } @catch (NSException *exception) {
|
|
|
+ ERR_PRINT("NSException: " + String::utf8([exception reason].UTF8String));
|
|
|
}
|
|
|
- } @catch (NSException *exception) {
|
|
|
- ERR_PRINT("NSException: " + String::utf8([exception reason].UTF8String));
|
|
|
}
|
|
|
}
|
|
|
|