Closed wrgallo closed 1 year ago
Currently the win32drv only support a single display, looking at the source-code there are lots of static variables to control that specific display window.
win32drv
static HWND g_window_handle = NULL; static HDC g_buffer_dc_handle = NULL; static UINT32* g_pixel_buffer = NULL; static SIZE_T g_pixel_buffer_size = 0; static lv_disp_t* g_display = NULL; static bool volatile g_display_refreshing = false; static bool volatile g_mouse_pressed = false; static LPARAM volatile g_mouse_value = 0; static bool volatile g_mousewheel_pressed = false; static int16_t volatile g_mousewheel_value = 0; static bool volatile g_keyboard_pressed = false; static WPARAM volatile g_keyboard_value = 0;
Also there are 3 global variables to windows drivers input devices (mouse , keyboard and mousewheel).
EXTERN_C lv_indev_t* lv_win32_pointer_device_object; EXTERN_C lv_indev_t* lv_win32_keypad_device_object; EXTERN_C lv_indev_t* lv_win32_encoder_device_object;
But, each input driver needs to be assigned to a display which makes those global variable useless for other displays.
I am already working on a pull request to fix this issue.
cc @MouriNaruto
@kisvegabor Got it. I will try to add this feature to win32drv.
Kenji Mouri
Thank you!
@wrgallo @kisvegabor
I have just added the multiple displays support and preparing the PR.
Currently the
win32drv
only support a single display, looking at the source-code there are lots of static variables to control that specific display window.Also there are 3 global variables to windows drivers input devices (mouse , keyboard and mousewheel).
But, each input driver needs to be assigned to a display which makes those global variable useless for other displays.
I am already working on a pull request to fix this issue.