mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
Qt: run clang-format on pcsx2-qt/ sources files
This commit is contained in:
@@ -295,7 +295,7 @@ void GameListWidget::initialize()
|
||||
{
|
||||
loadTableHeaderState();
|
||||
// Enforce at least one column is visible immediately after loading.
|
||||
// This handles cases where a config (perhaps from an older version) has 0 columns and
|
||||
// This handles cases where a config (perhaps from an older version) has 0 columns and
|
||||
// no games are visible to be changed (such as per-game config) or played as you can't click on any.
|
||||
// Will automatically repair a broken header state from config (PCSX2.ini) file.
|
||||
ensureMinimumOneColumnVisible();
|
||||
@@ -825,7 +825,7 @@ void GameListWidget::ensureMinimumOneColumnVisible()
|
||||
}
|
||||
|
||||
// If absolutely everything is hidden, force the Title column to be visible.
|
||||
// This ensures there is always a right-click menu on the column available to restore
|
||||
// This ensures there is always a right-click menu on the column available to restore
|
||||
// other columns or access the "Reset All Columns" option or even re-order them with drag and drop.
|
||||
// By default Qt will hide everything if it sees 0 viable columns, so just enforce atleast 1 column.
|
||||
// Adding ghost columns would be hacky and ugly so let's not do that.
|
||||
|
||||
+17
-14
@@ -2669,24 +2669,27 @@ void MainWindow::mouseLockRequested(bool state)
|
||||
{
|
||||
#ifdef __linux__ // Mouse locking is only supported on X11
|
||||
const bool mouse_lock_supported = QGuiApplication::platformName().toLower() == "xcb";
|
||||
if (!mouse_lock_supported)
|
||||
return;
|
||||
if (!mouse_lock_supported)
|
||||
return;
|
||||
#endif
|
||||
|
||||
Host::SetBaseBoolSettingValue("EmuCore", "EnableMouseLock", state);
|
||||
Host::CommitBaseSettingChanges();
|
||||
Host::SetBaseBoolSettingValue("EmuCore", "EnableMouseLock", state);
|
||||
Host::CommitBaseSettingChanges();
|
||||
|
||||
if (state) {
|
||||
setupMouseMoveHandler();
|
||||
} else {
|
||||
Common::DetachMousePositionCb();
|
||||
}
|
||||
if (state)
|
||||
{
|
||||
setupMouseMoveHandler();
|
||||
}
|
||||
else
|
||||
{
|
||||
Common::DetachMousePositionCb();
|
||||
}
|
||||
|
||||
if (m_settings_window)
|
||||
{
|
||||
InterfaceSettingsWidget* interface_settings = m_settings_window->getInterfaceSettingsWidget();
|
||||
interface_settings->updateMouseLockCheckbox(state ? Qt::Checked : Qt::Unchecked);
|
||||
}
|
||||
if (m_settings_window)
|
||||
{
|
||||
InterfaceSettingsWidget* interface_settings = m_settings_window->getInterfaceSettingsWidget();
|
||||
interface_settings->updateMouseLockCheckbox(state ? Qt::Checked : Qt::Unchecked);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::releaseRenderWindow()
|
||||
|
||||
@@ -138,7 +138,7 @@ private Q_SLOTS:
|
||||
std::optional<WindowInfo> acquireRenderWindow(bool recreate_window, bool fullscreen, bool render_to_main, bool surfaceless);
|
||||
void displayResizeRequested(qint32 width, qint32 height);
|
||||
void mouseModeRequested(bool relative_mode, bool hide_cursor);
|
||||
void mouseLockRequested(bool state);
|
||||
void mouseLockRequested(bool state);
|
||||
void releaseRenderWindow();
|
||||
void setupMouseMoveHandler();
|
||||
void onGameListRefreshComplete();
|
||||
|
||||
+1
-1
@@ -1739,7 +1739,7 @@ void Host::SetMouseMode(bool relative_mode, bool hide_cursor)
|
||||
|
||||
void Host::SetMouseLock(bool state)
|
||||
{
|
||||
emit g_emu_thread->onMouseLockRequested(state);
|
||||
emit g_emu_thread->onMouseLockRequested(state);
|
||||
}
|
||||
|
||||
void QtHost::LockVMWithDialog()
|
||||
|
||||
@@ -16,7 +16,7 @@ public:
|
||||
~InterfaceSettingsWidget();
|
||||
|
||||
void updatePromptOnStateLoadSaveFailureCheckbox(Qt::CheckState state);
|
||||
void updateMouseLockCheckbox(Qt::CheckState state);
|
||||
void updateMouseLockCheckbox(Qt::CheckState state);
|
||||
|
||||
Q_SIGNALS:
|
||||
void themeChanged();
|
||||
|
||||
Reference in New Issue
Block a user