mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Disable Freelook in hardcore mode
The player getting a better view of their surroundings than the game would normally allow could possibly give the player an advantage over the original hardware, so Freelook is disabled in hardcore mode. To do this, I disable the config flag for Freelook when it is accessed, to make sure that it is disabled whether it was enabled before or after hardcore mode was enabled.
This commit is contained in:
@ -9,6 +9,8 @@
|
||||
#include <QPushButton>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "Core/AchievementManager.h"
|
||||
#include "Core/Config/AchievementSettings.h"
|
||||
#include "Core/Config/FreeLookSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
@ -36,6 +38,10 @@ void FreeLookWidget::CreateLayout()
|
||||
m_enable_freelook->SetDescription(
|
||||
tr("Allows manipulation of the in-game camera.<br><br><dolphin_emphasis>If unsure, "
|
||||
"leave this unchecked.</dolphin_emphasis>"));
|
||||
#ifdef USE_RETRO_ACHIEVEMENTS
|
||||
bool hardcore = AchievementManager::GetInstance()->IsHardcoreModeActive();
|
||||
m_enable_freelook->setEnabled(!hardcore);
|
||||
#endif // USE_RETRO_ACHIEVEMENTS
|
||||
m_freelook_controller_configure_button = new NonDefaultQPushButton(tr("Configure Controller"));
|
||||
|
||||
m_freelook_control_type = new ConfigChoice({tr("Six Axis"), tr("First Person"), tr("Orbital")},
|
||||
@ -106,6 +112,10 @@ void FreeLookWidget::LoadSettings()
|
||||
{
|
||||
const bool checked = Config::Get(Config::FREE_LOOK_ENABLED);
|
||||
m_enable_freelook->setChecked(checked);
|
||||
#ifdef USE_RETRO_ACHIEVEMENTS
|
||||
bool hardcore = AchievementManager::GetInstance()->IsHardcoreModeActive();
|
||||
m_enable_freelook->setEnabled(!hardcore);
|
||||
#endif // USE_RETRO_ACHIEVEMENTS
|
||||
m_freelook_control_type->setEnabled(checked);
|
||||
m_freelook_controller_configure_button->setEnabled(checked);
|
||||
m_freelook_background_input->setEnabled(checked);
|
||||
|
Reference in New Issue
Block a user