diff --git a/main.cpp b/main.cpp index c6043ac..86a6db1 100644 --- a/main.cpp +++ b/main.cpp @@ -1,14 +1,14 @@ -// libcef -#include "include/cef_frame_handler.h" #include -#include -#include #include +#include #include #include +#include #include +#include -class AyaCEFApp : public CefApp { +class AyaCEFApp : public CefApp +{ public: AyaCEFApp () {}; @@ -45,10 +45,11 @@ public: { // this should start to become a tuple of some kind because this is // shit if we want to let users have more control over js w/ lua - + // but this is good enough as a poc & can be used for replication // across different clients connected to a server - if (name == "sendResultToCpp" && arguments.size() == 1) { + if (name == "sendResultToCpp" && arguments.size() == 1) + { CefRefPtr msg = CefProcessMessage::Create("resultMessage"); CefRefPtr args = msg->GetArgumentList(); @@ -61,6 +62,7 @@ public: return true; } + return false; } @@ -69,8 +71,16 @@ private: }; +#ifdef WIN32 int CALLBACK WinMain(_In_ HINSTANCE hInstance, _In_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nCmdShow) { CefMainArgs args(hInstance); return CefExecuteProcess(args, new AyaSubProcess(), nullptr); -} \ No newline at end of file +} +#else +int main(int argc, char* argv[]) +{ + CefMainArgs args(argc, argv); + return CefExecuteProcess(args, new AyaSubProcess(), nullptr); +} +#endif \ No newline at end of file