Fix the test in main causing access violation

This commit is contained in:
UnknownShadow200 2017-08-19 15:38:16 +10:00
parent d6a8b7d35c
commit 5af72543bf
2 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,8 @@ int main(int argc, char* argv[]) {
ErrorHandler_Init();
Platform_Init();
Window_Create(0, 0, 320, 320, "TEST", NULL);
String str = String_FromConstant("TEST");
Window_Create(320, 320, 320, 320, &str, NULL);
Window_SetVisible(true);
while (true) {
Window_ProcessEvents();

View File

@ -442,7 +442,7 @@ void Window_Create(Int32 x, Int32 y, Int32 width, Int32 height, STRING_TRANSIENT
}
win_Handle = CreateWindowExA(
win_StyleEx, win_ClassName, title->buffer, win_Style,
win_StyleEx, atom, title->buffer, win_Style,
rect.left, rect.top, RECT_WIDTH(rect), RECT_HEIGHT(rect),
NULL, NULL, win_Instance, NULL);