This commit is contained in:
Branimir Karadžić 2015-10-20 19:00:13 -07:00
parent 679764f3ef
commit 4ca38cfa0e
2 changed files with 11 additions and 4 deletions

View File

@ -320,6 +320,9 @@ BX_PRAGMA_DIAGNOSTIC_POP();
{
_app->init(_argc, _argv);
WindowHandle defaultWindow = { 0 };
setWindowSize(defaultWindow, ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT);
#if BX_PLATFORM_EMSCRIPTEN
s_app = _app;
emscripten_set_main_loop(&updateApp, -1, 1);
@ -349,6 +352,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
entry::WindowHandle defaultWindow = { 0 };
entry::setWindowTitle(defaultWindow, bx::baseName(_argv[0]) );
setWindowSize(defaultWindow, ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT);
int32_t result = ::_main_(_argc, _argv);
@ -616,6 +620,9 @@ BX_PRAGMA_DIAGNOSTIC_POP();
}
break;
case Event::Suspend:
break;
default:
break;
}

View File

@ -444,7 +444,7 @@ namespace entry
const float centerY = (screenRect.size.height - (float)ENTRY_DEFAULT_HEIGHT)*0.5f;
m_windowAlloc.alloc();
NSRect rect = NSMakeRect(centerX, centerY, (float)ENTRY_DEFAULT_WIDTH, (float)ENTRY_DEFAULT_HEIGHT);
NSRect rect = NSMakeRect(centerX, centerY, 1.0f, 1.0f);
NSWindow* window = [[NSWindow alloc]
initWithContentRect:rect
styleMask:m_style