early-access version 1411

This commit is contained in:
pineappleEA 2021-02-04 03:47:55 +01:00
parent 7023d1239c
commit 228b484ea0
7 changed files with 31 additions and 17 deletions

View File

@ -1,7 +1,7 @@
yuzu emulator early access
=============
This is the source code for early-access 1410.
This is the source code for early-access 1411.
## Legal Notice

View File

@ -120,7 +120,7 @@ ResultCode KAddressArbiter::SignalAndIncrementIfEqual(VAddr addr, s32 value, s32
s32 user_value{};
R_UNLESS(UpdateIfEqual(system, std::addressof(user_value), addr, value, value + 1),
Svc::ResultInvalidCurrentMemory);
R_UNLESS(user_value == value, Svc::ResultInvalidState);
R_UNLESS_NOLOG(user_value == value, Svc::ResultInvalidState);
auto it = thread_tree.nfind_light({addr, -1});
while ((it != thread_tree.end()) && (count <= 0 || num_waiters < count) &&

View File

@ -70,10 +70,16 @@ void Mouse::MouseMove(int x, int y, int center_x, int center_y) {
for (MouseInfo& info : mouse_info) {
if (Settings::values.mouse_panning) {
const auto mouse_change = Common::MakeVec(x, y) - Common::MakeVec(center_x, center_y);
info.data.axis = {mouse_change.x, -mouse_change.y};
const auto angle = std::atan2(-mouse_change.y, mouse_change.x);
const auto length =
(mouse_change.y * mouse_change.y) + (mouse_change.x * mouse_change.x);
if (mouse_change.x == 0 && mouse_change.y == 0) {
info.data.axis = {static_cast<int>(100 * std::cos(angle)),
static_cast<int>(100 * std::sin(angle))};
if (length < 4) {
info.tilt_speed = 0;
info.data.axis = {};
} else {
info.tilt_direction = mouse_change.Cast<float>();
info.tilt_speed = info.tilt_direction.Normalize() * info.sensitivity;

View File

@ -510,7 +510,7 @@ void Config::ReadControlValues() {
ReadSetting(QStringLiteral("emulate_analog_keyboard"), false).toBool();
Settings::values.mouse_panning = ReadSetting(QStringLiteral("mouse_panning"), false).toBool();
Settings::values.mouse_panning_sensitivity =
ReadSetting(QStringLiteral("mouse_panning_sensitivity"), 16).toFloat();
ReadSetting(QStringLiteral("mouse_panning_sensitivity"), 1).toFloat();
ReadSettingGlobal(Settings::values.use_docked_mode, QStringLiteral("use_docked_mode"), true);
ReadSettingGlobal(Settings::values.vibration_enabled, QStringLiteral("vibration_enabled"),
@ -1190,7 +1190,7 @@ void Config::SaveControlValues() {
Settings::values.emulate_analog_keyboard, false);
WriteSetting(QStringLiteral("mouse_panning"), Settings::values.mouse_panning, false);
WriteSetting(QStringLiteral("mouse_panning_sensitivity"),
Settings::values.mouse_panning_sensitivity, 16.0f);
Settings::values.mouse_panning_sensitivity, 1.0f);
qt_config->endGroup();
}

View File

@ -2574,23 +2574,26 @@
</item>
<item row="2" column="2">
<widget class="QDoubleSpinBox" name="mouse_panning_sensitivity">
<property name="toolTip">
<string>Mouse sensitivity</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="decimals">
<number>1</number>
<number>2</number>
</property>
<property name="minimum">
<double>0.100000000000000</double>
</property>
<property name="maximum">
<double>32.000000000000000</double>
<double>16.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
<double>0.010000000000000</double>
</property>
<property name="value">
<double>16.000000000000000</double>
<double>1.000000000000000</double>
</property>
</widget>
</item>

View File

@ -590,9 +590,7 @@ void ConfigureInputPlayer::ApplyConfiguration() {
if (player_index == 0) {
auto& handheld = Settings::values.players.GetValue()[HANDHELD_INDEX];
const auto handheld_connected = handheld.connected;
if (player.controller_type == Settings::ControllerType::Handheld) {
handheld = player;
}
handheld = player;
handheld.connected = handheld_connected;
}
}
@ -606,7 +604,7 @@ void ConfigureInputPlayer::TryConnectSelectedController() {
controller_type != Settings::ControllerType::Handheld;
// Connect Handheld depending on Player 1's controller configuration.
if (player_index == 0 && controller_type == Settings::ControllerType::Handheld) {
if (player_index == 0) {
auto& handheld = Settings::values.players.GetValue()[HANDHELD_INDEX];
const auto handheld_connected = ui->groupConnectedController->isChecked() &&
controller_type == Settings::ControllerType::Handheld;

View File

@ -852,8 +852,14 @@ void GMainWindow::InitializeHotkeys() {
[] { Settings::values.audio_muted = !Settings::values.audio_muted; });
connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Toggle Mouse Panning"), this),
&QShortcut::activated, this,
[] { Settings::values.mouse_panning = !Settings::values.mouse_panning; });
&QShortcut::activated, this, [&] {
Settings::values.mouse_panning = !Settings::values.mouse_panning;
if (UISettings::values.hide_mouse || Settings::values.mouse_panning) {
mouse_hide_timer.start();
render_window->installEventFilter(render_window);
render_window->setAttribute(Qt::WA_Hover, true);
}
});
}
void GMainWindow::SetDefaultUIGeometry() {
@ -2603,7 +2609,8 @@ void GMainWindow::UpdateUISettings() {
}
void GMainWindow::HideMouseCursor() {
if (emu_thread == nullptr || UISettings::values.hide_mouse == false) {
if (emu_thread == nullptr ||
(!UISettings::values.hide_mouse && !Settings::values.mouse_panning)) {
mouse_hide_timer.stop();
ShowMouseCursor();
return;