early-access version 1317
This commit is contained in:
@@ -6,6 +6,7 @@ add_executable(tests
|
||||
common/ring_buffer.cpp
|
||||
core/core_timing.cpp
|
||||
tests.cpp
|
||||
video_core/buffer_base.cpp
|
||||
)
|
||||
|
||||
create_target_directory_groups(tests)
|
||||
|
@@ -42,8 +42,8 @@ public:
|
||||
return it == page_table.end() ? 0 : it->second;
|
||||
}
|
||||
|
||||
[[nodiscard]] int Count() const noexcept {
|
||||
int count = 0;
|
||||
[[nodiscard]] unsigned Count() const noexcept {
|
||||
unsigned count = 0;
|
||||
for (const auto [index, value] : page_table) {
|
||||
count += value;
|
||||
}
|
||||
@@ -120,11 +120,11 @@ TEST_CASE("BufferBase: Basic range", "[video_core]") {
|
||||
buffer.MarkRegionAsCpuModified(c, PAGE);
|
||||
int num = 0;
|
||||
buffer.ForEachUploadRange(c, WORD, [&](u64 offset, u64 size) {
|
||||
REQUIRE(offset == 0);
|
||||
REQUIRE(offset == 0U);
|
||||
REQUIRE(size == PAGE);
|
||||
++num;
|
||||
});
|
||||
REQUIRE(num == 1);
|
||||
REQUIRE(num == 1U);
|
||||
}
|
||||
|
||||
TEST_CASE("BufferBase: Border upload", "[video_core]") {
|
||||
@@ -183,7 +183,7 @@ TEST_CASE("BufferBase: Partial word uploads", "[video_core]") {
|
||||
BufferBase buffer(rasterizer, c, 0x9d000);
|
||||
int num = 0;
|
||||
buffer.ForEachUploadRange(c, WORD, [&](u64 offset, u64 size) {
|
||||
REQUIRE(offset == 0);
|
||||
REQUIRE(offset == 0U);
|
||||
REQUIRE(size == WORD);
|
||||
++num;
|
||||
});
|
||||
|
@@ -1,6 +1,7 @@
|
||||
add_subdirectory(host_shaders)
|
||||
|
||||
add_library(video_core STATIC
|
||||
buffer_cache/buffer_base.h
|
||||
buffer_cache/buffer_block.h
|
||||
buffer_cache/buffer_cache.h
|
||||
buffer_cache/map_interval.cpp
|
||||
|
@@ -117,31 +117,13 @@ void ConfigureDialog::UpdateVisibleTabs() {
|
||||
return;
|
||||
}
|
||||
|
||||
const std::map<QWidget*, QString> widgets = {
|
||||
{ui->generalTab, tr("General")},
|
||||
{ui->systemTab, tr("System")},
|
||||
{ui->profileManagerTab, tr("Profiles")},
|
||||
{ui->inputTab, tr("Controls")},
|
||||
{ui->hotkeysTab, tr("Hotkeys")},
|
||||
{ui->cpuTab, tr("CPU")},
|
||||
{ui->cpuDebugTab, tr("Debug")},
|
||||
{ui->graphicsTab, tr("Graphics")},
|
||||
{ui->graphicsAdvancedTab, tr("Advanced")},
|
||||
{ui->audioTab, tr("Audio")},
|
||||
{ui->debugTab, tr("Debug")},
|
||||
{ui->webTab, tr("Web")},
|
||||
{ui->uiTab, tr("UI")},
|
||||
{ui->filesystemTab, tr("Filesystem")},
|
||||
{ui->serviceTab, tr("Services")},
|
||||
};
|
||||
|
||||
[[maybe_unused]] const QSignalBlocker blocker(ui->tabWidget);
|
||||
|
||||
ui->tabWidget->clear();
|
||||
|
||||
const QList<QWidget*> tabs = qvariant_cast<QList<QWidget*>>(items[0]->data(Qt::UserRole));
|
||||
const auto tabs = qvariant_cast<QList<QWidget*>>(items[0]->data(Qt::UserRole));
|
||||
|
||||
for (const auto tab : tabs) {
|
||||
for (auto* const tab : tabs) {
|
||||
ui->tabWidget->addTab(tab, tab->accessibleName());
|
||||
}
|
||||
}
|
||||
|
@@ -4,12 +4,15 @@
|
||||
|
||||
#include <array>
|
||||
#include <sstream>
|
||||
|
||||
#include <QCloseEvent>
|
||||
#include <QLabel>
|
||||
#include <QMessageBox>
|
||||
#include <QPushButton>
|
||||
#include <QRegularExpression>
|
||||
#include <QStringListModel>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "common/logging/log.h"
|
||||
#include "core/settings.h"
|
||||
#include "input_common/main.h"
|
||||
@@ -101,7 +104,6 @@ ConfigureMotionTouch::~ConfigureMotionTouch() = default;
|
||||
void ConfigureMotionTouch::SetConfiguration() {
|
||||
const Common::ParamPackage motion_param(Settings::values.motion_device);
|
||||
const Common::ParamPackage touch_param(Settings::values.touch_device);
|
||||
const std::string motion_engine = motion_param.Get("engine", "motion_emu");
|
||||
|
||||
ui->touch_from_button_checkbox->setChecked(Settings::values.use_touch_from_button);
|
||||
touch_from_button_maps = Settings::values.touch_from_button_maps;
|
||||
@@ -166,14 +168,14 @@ void ConfigureMotionTouch::ConnectEvents() {
|
||||
|
||||
void ConfigureMotionTouch::OnUDPAddServer() {
|
||||
// Validator for IP address
|
||||
QRegExp re(QStringLiteral(
|
||||
const QRegularExpression re(QStringLiteral(
|
||||
R"re(^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$)re"));
|
||||
bool ok;
|
||||
QString port_text = ui->udp_port->text();
|
||||
QString server_text = ui->udp_server->text();
|
||||
const QString port_text = ui->udp_port->text();
|
||||
const QString server_text = ui->udp_server->text();
|
||||
const QString server_string = tr("%1:%2").arg(server_text, port_text);
|
||||
int port_number = port_text.toInt(&ok, 10);
|
||||
int row = udp_server_list_model->rowCount();
|
||||
const int port_number = port_text.toInt(&ok, 10);
|
||||
const int row = udp_server_list_model->rowCount();
|
||||
|
||||
if (!ok) {
|
||||
QMessageBox::warning(this, tr("yuzu"), tr("Port number has invalid characters"));
|
||||
@@ -183,7 +185,7 @@ void ConfigureMotionTouch::OnUDPAddServer() {
|
||||
QMessageBox::warning(this, tr("yuzu"), tr("Port has to be in range 0 and 65353"));
|
||||
return;
|
||||
}
|
||||
if (!re.exactMatch(server_text)) {
|
||||
if (!re.match(server_text).hasMatch()) {
|
||||
QMessageBox::warning(this, tr("yuzu"), tr("IP address is not valid"));
|
||||
return;
|
||||
}
|
||||
@@ -306,7 +308,6 @@ void ConfigureMotionTouch::ApplyConfiguration() {
|
||||
}
|
||||
|
||||
Common::ParamPackage touch_param{};
|
||||
|
||||
touch_param.Set("min_x", min_x);
|
||||
touch_param.Set("min_y", min_y);
|
||||
touch_param.Set("max_x", max_x);
|
||||
|
Reference in New Issue
Block a user