diff --git a/src/86box.c b/src/86box.c index c8316b46d..efa9e84bf 100644 --- a/src/86box.c +++ b/src/86box.c @@ -1728,6 +1728,7 @@ pc_reset_hard_init(void) void update_mouse_msg(void) { +#ifdef USE_SDL_UI wchar_t wcpufamily[2048]; wchar_t wcpu[2048]; wchar_t wmachine[2048]; @@ -1744,13 +1745,6 @@ update_mouse_msg(void) if (wcp) /* remove parentheses */ *(wcp - 1) = L'\0'; mbstowcs(wcpu, cpu_s->name, strlen(cpu_s->name) + 1); -#ifdef _WIN32 - swprintf(mouse_msg[0], sizeof_w(mouse_msg[0]), L"%%i%%%% - %ls", - plat_get_string(STRING_MOUSE_CAPTURE)); - swprintf(mouse_msg[1], sizeof_w(mouse_msg[1]), L"%%i%%%% - %ls", - (mouse_get_buttons() > 2) ? plat_get_string(STRING_MOUSE_RELEASE) : plat_get_string(STRING_MOUSE_RELEASE_MMB)); - wcsncpy(mouse_msg[2], L"%i%%", sizeof_w(mouse_msg[2])); -#else swprintf(mouse_msg[0], sizeof_w(mouse_msg[0]), L"%ls v%ls - %%i%%%% - %ls - %ls/%ls - %ls", EMU_NAME_W, EMU_VERSION_FULL_W, wmachine, wcpufamily, wcpu, plat_get_string(STRING_MOUSE_CAPTURE)); @@ -1759,6 +1753,12 @@ update_mouse_msg(void) (mouse_get_buttons() > 2) ? plat_get_string(STRING_MOUSE_RELEASE) : plat_get_string(STRING_MOUSE_RELEASE_MMB)); swprintf(mouse_msg[2], sizeof_w(mouse_msg[2]), L"%ls v%ls - %%i%%%% - %ls - %ls/%ls", EMU_NAME_W, EMU_VERSION_FULL_W, wmachine, wcpufamily, wcpu); +#else + swprintf(mouse_msg[0], sizeof_w(mouse_msg[0]), L"%%i%%%% - %ls", + plat_get_string(STRING_MOUSE_CAPTURE)); + swprintf(mouse_msg[1], sizeof_w(mouse_msg[1]), L"%%i%%%% - %ls", + (mouse_get_buttons() > 2) ? plat_get_string(STRING_MOUSE_RELEASE) : plat_get_string(STRING_MOUSE_RELEASE_MMB)); + wcsncpy(mouse_msg[2], L"%i%%", sizeof_w(mouse_msg[2])); #endif } diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index c51ae6269..083f0761a 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -313,20 +313,7 @@ MainWindow::MainWindow(QWidget *parent) return; } if (!hide_tool_bar) -#ifdef _WIN32 toolbar_label->setText(title); -#else - { - /* get the percentage and mouse message, TODO: refactor ui_window_title() */ - auto parts = title.split(" - "); - if (parts.size() >= 2) { - if (parts.size() < 5) - toolbar_label->setText(parts[1]); - else - toolbar_label->setText(QString("%1 - %2").arg(parts[1], parts.last())); - } - } -#endif }); connect(this, &MainWindow::getTitleForNonQtThread, this, &MainWindow::getTitle_, Qt::BlockingQueuedConnection);