Add Cocoa and macOS code to CMakeLists

This commit is contained in:
scawful
2023-11-24 13:35:34 -05:00
parent 1fb3d2058a
commit 004e5917ee
3 changed files with 26 additions and 8 deletions

View File

@@ -1,5 +1,7 @@
#if defined(_WIN32)
#define main SDL_main
#elif __APPLE__
#include "app/core/platform/app_delegate.h"
#endif
#include "absl/debugging/failure_signal_handler.h"
@@ -17,6 +19,11 @@ int main(int argc, char** argv) {
yaze::app::core::Controller controller;
EXIT_IF_ERROR(controller.OnEntry())
#ifdef __APPLE__
InitializeCocoa();
#endif
while (controller.IsActive()) {
controller.OnInput();
controller.OnLoad();