Working multimonitor

This commit is contained in:
Cacodemon345
2022-07-04 01:50:42 +06:00
parent af3f2685e1
commit 7ab71cafd3
18 changed files with 165 additions and 52 deletions

View File

@@ -57,14 +57,14 @@ wchar_t* ui_window_title(wchar_t* str)
extern "C" void qt_blit(int x, int y, int w, int h, int monitor_index)
{
main_window->blitToWidget(x, y, w, h);
main_window->blitToWidget(x, y, w, h, monitor_index);
}
void mouse_poll() {
main_window->pollMouse();
}
void plat_resize(int w, int h) {
void plat_resize_monitor(int w, int h, int monitor_index) {
main_window->resizeContents(w, h);
}
@@ -98,6 +98,20 @@ int ui_msgbox_header(int flags, void *header, void* message) {
return 0;
}
void ui_init_monitor(int monitor_index) {
if (QThread::currentThread() == main_window->thread()) {
emit main_window->initRendererMonitor(monitor_index);
}
else emit main_window->initRendererMonitorForNonQtThread(monitor_index);
}
void ui_deinit_monitor(int monitor_index) {
if (QThread::currentThread() == main_window->thread()) {
emit main_window->destroyRendererMonitor(monitor_index);
}
else emit main_window->destroyRendererMonitorForNonQtThread(monitor_index);
}
int ui_msgbox(int flags, void *message) {
return ui_msgbox_header(flags, nullptr, message);
}