You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
Add support for getting native display, window, and view handles.
This commit is contained in:
@@ -571,6 +571,24 @@ void DisplayServerWindows::gl_window_make_current(DisplayServer::WindowID p_wind
|
||||
#endif
|
||||
}
|
||||
|
||||
int64_t DisplayServerWindows::window_get_native_handle(HandleType p_handle_type, WindowID p_window) const {
|
||||
ERR_FAIL_COND_V(!windows.has(p_window), 0);
|
||||
switch (p_handle_type) {
|
||||
case DISPLAY_HANDLE: {
|
||||
return 0; // Not supported.
|
||||
}
|
||||
case WINDOW_HANDLE: {
|
||||
return (int64_t)windows[p_window].hWnd;
|
||||
}
|
||||
case WINDOW_VIEW: {
|
||||
return 0; // Not supported.
|
||||
}
|
||||
default: {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayServerWindows::window_attach_instance_id(ObjectID p_instance, WindowID p_window) {
|
||||
_THREAD_SAFE_METHOD_
|
||||
|
||||
|
||||
Reference in New Issue
Block a user