early-access version 3329
This commit is contained in:
parent
7baa863787
commit
ebe91be572
14 changed files with 26 additions and 32 deletions
|
@ -1,7 +1,7 @@
|
|||
yuzu emulator early access
|
||||
=============
|
||||
|
||||
This is the source code for early-access 3328.
|
||||
This is the source code for early-access 3329.
|
||||
|
||||
## Legal Notice
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
namespace Core::HID {
|
||||
constexpr s32 HID_JOYSTICK_MAX = 0x7fff;
|
||||
constexpr s32 HID_JOYSTICK_MIN = 0x7ffe;
|
||||
constexpr s32 HID_TRIGGER_MAX = 0x7fff;
|
||||
// Use a common UUID for TAS and Virtual Gamepad
|
||||
constexpr Common::UUID TAS_UUID =
|
||||
|
@ -864,16 +863,9 @@ void EmulatedController::SetStick(const Common::Input::CallbackStatus& callback,
|
|||
return;
|
||||
}
|
||||
|
||||
const auto FloatToShort = [](float a) {
|
||||
if (a > 0) {
|
||||
return static_cast<s32>(a * HID_JOYSTICK_MAX);
|
||||
}
|
||||
return static_cast<s32>(a * HID_JOYSTICK_MIN);
|
||||
};
|
||||
|
||||
const AnalogStickState stick{
|
||||
.x = FloatToShort(controller.stick_values[index].x.value),
|
||||
.y = FloatToShort(controller.stick_values[index].y.value),
|
||||
.x = static_cast<s32>(controller.stick_values[index].x.value * HID_JOYSTICK_MAX),
|
||||
.y = static_cast<s32>(controller.stick_values[index].y.value * HID_JOYSTICK_MAX),
|
||||
};
|
||||
|
||||
switch (index) {
|
||||
|
|
|
@ -11,6 +11,11 @@ namespace InputCommon {
|
|||
|
||||
class Stick final : public Common::Input::InputDevice {
|
||||
public:
|
||||
// Some games such as EARTH DEFENSE FORCE: WORLD BROTHERS
|
||||
// do not play nicely with the theoretical maximum range.
|
||||
// Using a value one lower from the maximum emulates real stick behavior.
|
||||
static constexpr float MAX_RANGE = 32766.0f / 32767.0f;
|
||||
|
||||
using Button = std::unique_ptr<Common::Input::InputDevice>;
|
||||
|
||||
Stick(Button up_, Button down_, Button left_, Button right_, Button modifier_, Button updater_,
|
||||
|
@ -196,7 +201,7 @@ public:
|
|||
}
|
||||
|
||||
void UpdateStatus() {
|
||||
const float coef = modifier_status.value ? modifier_scale : 1.0f;
|
||||
const float coef = modifier_status.value ? modifier_scale : MAX_RANGE;
|
||||
|
||||
bool r = right_status;
|
||||
bool l = left_status;
|
||||
|
@ -290,7 +295,7 @@ public:
|
|||
if (down_status) {
|
||||
--y;
|
||||
}
|
||||
const float coef = modifier_status.value ? modifier_scale : 1.0f;
|
||||
const float coef = modifier_status.value ? modifier_scale : MAX_RANGE;
|
||||
status.x.raw_value = static_cast<float>(x) * coef * (y == 0 ? 1.0f : SQRT_HALF);
|
||||
status.y.raw_value = static_cast<float>(y) * coef * (x == 0 ? 1.0f : SQRT_HALF);
|
||||
return status;
|
||||
|
|
|
@ -66,7 +66,6 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_,
|
|||
|
||||
web_tab->SetWebServiceConfigEnabled(enable_web_config);
|
||||
hotkeys_tab->Populate(registry);
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
|
||||
input_tab->Initialize(input_subsystem);
|
||||
|
||||
|
|
|
@ -89,7 +89,6 @@ ConfigureMotionTouch::ConfigureMotionTouch(QWidget* parent,
|
|||
"using-a-controller-or-android-phone-for-motion-or-touch-input'><span "
|
||||
"style=\"text-decoration: underline; color:#039be5;\">Learn More</span></a>"));
|
||||
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
SetConfiguration();
|
||||
UpdateUiDisplay();
|
||||
ConnectEvents();
|
||||
|
|
|
@ -66,8 +66,6 @@ ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::st
|
|||
|
||||
setFocusPolicy(Qt::ClickFocus);
|
||||
setWindowTitle(tr("Properties"));
|
||||
// remove Help question mark button from the title bar
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
|
||||
addons_tab->SetTitleId(title_id);
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ ConfigureTasDialog::ConfigureTasDialog(QWidget* parent)
|
|||
|
||||
setFocusPolicy(Qt::ClickFocus);
|
||||
setWindowTitle(tr("TAS Configuration"));
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
|
||||
connect(ui->tas_path_button, &QToolButton::pressed, this,
|
||||
[this] { SetDirectory(DirectoryTarget::TAS, ui->tas_path_edit); });
|
||||
|
|
|
@ -20,9 +20,8 @@ ControllerDialog::ControllerDialog(Core::HID::HIDCore& hid_core_,
|
|||
setWindowTitle(tr("Controller P1"));
|
||||
resize(500, 350);
|
||||
setMinimumSize(500, 350);
|
||||
// Remove the "?" button from the titlebar and enable the maximize button
|
||||
setWindowFlags((windowFlags() & ~Qt::WindowContextHelpButtonHint) |
|
||||
Qt::WindowMaximizeButtonHint);
|
||||
// Enable the maximize button
|
||||
setWindowFlags(windowFlags() | Qt::WindowMaximizeButtonHint);
|
||||
|
||||
widget = new PlayerControlPreview(this);
|
||||
refreshConfiguration();
|
||||
|
|
|
@ -49,9 +49,8 @@ MicroProfileDialog::MicroProfileDialog(QWidget* parent) : QWidget(parent, Qt::Di
|
|||
setObjectName(QStringLiteral("MicroProfile"));
|
||||
setWindowTitle(tr("&MicroProfile"));
|
||||
resize(1000, 600);
|
||||
// Remove the "?" button from the titlebar and enable the maximize button
|
||||
setWindowFlags((windowFlags() & ~Qt::WindowContextHelpButtonHint) |
|
||||
Qt::WindowMaximizeButtonHint);
|
||||
// Enable the maximize button
|
||||
setWindowFlags(windowFlags() | Qt::WindowMaximizeButtonHint);
|
||||
|
||||
#if MICROPROFILE_ENABLED
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@ InstallDialog::InstallDialog(QWidget* parent, const QStringList& files) : QDialo
|
|||
vbox_layout->addLayout(hbox_layout);
|
||||
|
||||
setLayout(vbox_layout);
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
setWindowTitle(tr("Install Files to NAND"));
|
||||
}
|
||||
|
||||
|
|
|
@ -2757,8 +2757,7 @@ void GMainWindow::OnMenuInstallToNAND() {
|
|||
ui->action_Install_File_NAND->setEnabled(false);
|
||||
|
||||
install_progress = new QProgressDialog(QString{}, tr("Cancel"), 0, total_size, this);
|
||||
install_progress->setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint &
|
||||
~Qt::WindowMaximizeButtonHint);
|
||||
install_progress->setWindowFlags(windowFlags() & ~Qt::WindowMaximizeButtonHint);
|
||||
install_progress->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
install_progress->setFixedWidth(installDialog.GetMinimumWidth() + 40);
|
||||
install_progress->show();
|
||||
|
@ -4455,6 +4454,9 @@ int main(int argc, char* argv[]) {
|
|||
}
|
||||
#endif
|
||||
|
||||
// Disables the "?" button on all dialogs.
|
||||
QCoreApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton);
|
||||
|
||||
// Enables the core to make the qt created contexts current on std::threads
|
||||
QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity);
|
||||
QApplication app(argc, argv);
|
||||
|
|
|
@ -16,8 +16,6 @@ LimitableInputDialog::LimitableInputDialog(QWidget* parent) : QDialog{parent} {
|
|||
LimitableInputDialog::~LimitableInputDialog() = default;
|
||||
|
||||
void LimitableInputDialog::CreateUI() {
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
|
||||
text_label = new QLabel(this);
|
||||
text_entry = new QLineEdit(this);
|
||||
text_label_invalid = new QLabel(this);
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
SequenceDialog::SequenceDialog(QWidget* parent) : QDialog(parent) {
|
||||
setWindowTitle(tr("Enter a hotkey"));
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
|
||||
key_sequence = new QKeySequenceEdit;
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
namespace DefaultINI {
|
||||
|
||||
const char* sdl2_config_file = R"(
|
||||
|
||||
const char* sdl2_config_file =
|
||||
R"(
|
||||
[ControlsP0]
|
||||
# The input devices and parameters for each Switch native input
|
||||
# The config section determines the player number where the config will be applied on. For example "ControlsP0", "ControlsP1", ...
|
||||
|
@ -143,6 +143,8 @@ mouse_enabled =
|
|||
# 0 (default): Disabled, 1: Enabled
|
||||
keyboard_enabled =
|
||||
|
||||
)"
|
||||
R"(
|
||||
[Core]
|
||||
# Whether to use multi-core for CPU emulation
|
||||
# 0: Disabled, 1 (default): Enabled
|
||||
|
@ -242,6 +244,8 @@ cpuopt_unsafe_fastmem_check =
|
|||
# 0: Disabled, 1 (default): Enabled
|
||||
cpuopt_unsafe_ignore_global_monitor =
|
||||
|
||||
)"
|
||||
R"(
|
||||
[Renderer]
|
||||
# Which backend API to use.
|
||||
# 0: OpenGL, 1 (default): Vulkan
|
||||
|
@ -360,6 +364,8 @@ bg_red =
|
|||
bg_blue =
|
||||
bg_green =
|
||||
|
||||
)"
|
||||
R"(
|
||||
[Audio]
|
||||
# Which audio output engine to use.
|
||||
# auto (default): Auto-select
|
||||
|
|
Loading…
Reference in a new issue