Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash fixes for the GDC tool #8582

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions engine/hid/src/native/hid_native.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ namespace dmHID
return false;
}

assert(context->m_Window && "No window has been set.");
dmPlatform::SetKeyboardCharCallback(context->m_Window, GLFWAddKeyboardChar, (void*) context);
dmPlatform::SetKeyboardMarkedTextCallback(context->m_Window, GLFWSetMarkedText, (void*) context);
dmPlatform::SetKeyboardDeviceChangedCallback(context->m_Window, GLFWDeviceChangedCallback, (void*) context);
Expand Down
3 changes: 3 additions & 0 deletions engine/tools/src/gdc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ int main(int argc, char *argv[])
window_params.m_Height = 32;
window_params.m_Title = "gdc";
window_params.m_PrintDeviceInfo = false;
window_params.m_GraphicsApi = dmPlatform::PLATFORM_GRAPHICS_API_OPENGL;

dmPlatform::HWindow window = dmPlatform::NewWindow();
dmPlatform::OpenWindow(window, window_params);

Expand All @@ -118,6 +120,7 @@ int main(int argc, char *argv[])
}

g_HidContext = dmHID::NewContext(dmHID::NewContextParams());
dmHID::SetWindow(g_HidContext, window);
dmHID::Init(g_HidContext);

retry:
Expand Down
Loading