mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-27 12:04:16 +01:00
Merge pull request #5471 from vitor-k/misc
Fix some warnings and some small changes
This commit is contained in:
commit
24086d05bb
@ -10,9 +10,6 @@
|
||||
#include <QOpenGLContext>
|
||||
#include <QOpenGLFunctions>
|
||||
#include <QOpenGLFunctions_3_3_Core>
|
||||
#include <QOpenGLWindow>
|
||||
#include <QScreen>
|
||||
#include <QWindow>
|
||||
#include <fmt/format.h>
|
||||
#include "citra_qt/bootmanager.h"
|
||||
#include "citra_qt/main.h"
|
||||
@ -233,8 +230,8 @@ void GRenderWindow::OnFramebufferSizeChanged() {
|
||||
// Screen changes potentially incur a change in screen DPI, hence we should update the
|
||||
// framebuffer size
|
||||
const qreal pixel_ratio = windowPixelRatio();
|
||||
const u32 width = this->width() * pixel_ratio;
|
||||
const u32 height = this->height() * pixel_ratio;
|
||||
const u32 width = static_cast<u32>(this->width() * pixel_ratio);
|
||||
const u32 height = static_cast<u32>(this->height() * pixel_ratio);
|
||||
UpdateCurrentFramebufferLayout(width, height);
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include "core/frontend/emu_window.h"
|
||||
|
||||
class QKeyEvent;
|
||||
class QScreen;
|
||||
class QTouchEvent;
|
||||
class QOffscreenSurface;
|
||||
class QOpenGLContext;
|
||||
|
@ -175,9 +175,9 @@ std::vector<u16> Rgb2Yuv(const QImage& source, int width, int height) {
|
||||
auto dest = buffer.begin();
|
||||
bool write = false;
|
||||
int py, pu, pv;
|
||||
for (int y = 0; y < height; ++y) {
|
||||
for (int x = 0; x < width; ++x) {
|
||||
QRgb rgb = source.pixel(x, y);
|
||||
for (int j = 0; j < height; ++j) {
|
||||
for (int i = 0; i < width; ++i) {
|
||||
QRgb rgb = source.pixel(i, j);
|
||||
int r = qRed(rgb);
|
||||
int g = qGreen(rgb);
|
||||
int b = qBlue(rgb);
|
||||
|
@ -12,9 +12,8 @@
|
||||
|
||||
namespace Camera {
|
||||
|
||||
QList<QVideoFrame::PixelFormat> QtCameraSurface::supportedPixelFormats(
|
||||
QAbstractVideoBuffer::HandleType handleType) const {
|
||||
Q_UNUSED(handleType);
|
||||
QList<QVideoFrame::PixelFormat> QtCameraSurface::supportedPixelFormats([
|
||||
[maybe_unused]] QAbstractVideoBuffer::HandleType handleType) const {
|
||||
return QList<QVideoFrame::PixelFormat>()
|
||||
<< QVideoFrame::Format_ARGB32 << QVideoFrame::Format_ARGB32_Premultiplied
|
||||
<< QVideoFrame::Format_RGB32 << QVideoFrame::Format_RGB24 << QVideoFrame::Format_RGB565
|
||||
|
@ -61,7 +61,8 @@ void ConfigureAudio::SetConfiguration() {
|
||||
SetAudioDeviceFromDeviceID();
|
||||
|
||||
ui->toggle_audio_stretching->setChecked(Settings::values.enable_audio_stretching);
|
||||
ui->volume_slider->setValue(Settings::values.volume * ui->volume_slider->maximum());
|
||||
ui->volume_slider->setValue(
|
||||
static_cast<int>(Settings::values.volume * ui->volume_slider->maximum()));
|
||||
SetVolumeIndicatorText(ui->volume_slider->sliderPosition());
|
||||
|
||||
int selection;
|
||||
|
@ -184,7 +184,7 @@ void ConfigureCamera::StartPreviewing() {
|
||||
ui->preview_box->setHidden(false);
|
||||
ui->preview_button->setHidden(true);
|
||||
preview_width = ui->preview_box->size().width();
|
||||
preview_height = preview_width * 0.75;
|
||||
preview_height = static_cast<int>(preview_width * 0.75);
|
||||
ui->preview_box->setToolTip(
|
||||
tr("Resolution: %1*%2")
|
||||
.arg(QString::number(preview_width), QString::number(preview_height)));
|
||||
@ -232,7 +232,7 @@ void ConfigureCamera::timerEvent(QTimerEvent* event) {
|
||||
}
|
||||
std::vector<u16> frame = previewing_camera->ReceiveFrame();
|
||||
int width = ui->preview_box->size().width();
|
||||
int height = width * 0.75;
|
||||
int height = static_cast<int>(width * 0.75);
|
||||
if (width != preview_width || height != preview_height) {
|
||||
StopPreviewing();
|
||||
return;
|
||||
|
@ -256,7 +256,7 @@ ConfigureInput::ConfigureInput(QWidget* parent)
|
||||
}
|
||||
});
|
||||
connect(analog_map_deadzone_and_modifier_slider[analog_id], &QSlider::valueChanged, [=] {
|
||||
const float slider_value = analog_map_deadzone_and_modifier_slider[analog_id]->value();
|
||||
const int slider_value = analog_map_deadzone_and_modifier_slider[analog_id]->value();
|
||||
if (analogs_param[analog_id].Get("engine", "") == "sdl") {
|
||||
analog_map_deadzone_and_modifier_slider_label[analog_id]->setText(
|
||||
tr("Deadzone: %1%").arg(slider_value));
|
||||
|
@ -168,10 +168,10 @@ void ConfigureMotionTouch::UpdateUiDisplay() {
|
||||
void ConfigureMotionTouch::ConnectEvents() {
|
||||
connect(ui->motion_provider,
|
||||
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
[this](int index) { UpdateUiDisplay(); });
|
||||
[this]([[maybe_unused]] int index) { UpdateUiDisplay(); });
|
||||
connect(ui->touch_provider,
|
||||
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
[this](int index) { UpdateUiDisplay(); });
|
||||
[this]([[maybe_unused]] int index) { UpdateUiDisplay(); });
|
||||
connect(ui->udp_test, &QPushButton::clicked, this, &ConfigureMotionTouch::OnCemuhookUDPTest);
|
||||
connect(ui->touch_calibration_config, &QPushButton::clicked, this,
|
||||
&ConfigureMotionTouch::OnConfigureTouchCalibration);
|
||||
|
@ -326,7 +326,8 @@ void ConfigureTouchFromButton::OnBindingChanged(QStandardItem* item) {
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigureTouchFromButton::OnBindingDeleted(const QModelIndex& parent, int first, int last) {
|
||||
void ConfigureTouchFromButton::OnBindingDeleted([[maybe_unused]] const QModelIndex& parent,
|
||||
int first, int last) {
|
||||
for (int i = first; i <= last; ++i) {
|
||||
auto ix = binding_list_model->index(i, 0);
|
||||
if (!ix.isValid()) {
|
||||
@ -513,7 +514,7 @@ void TouchScreenPreview::mouseMoveEvent(QMouseEvent* event) {
|
||||
}
|
||||
}
|
||||
|
||||
void TouchScreenPreview::leaveEvent(QEvent* event) {
|
||||
void TouchScreenPreview::leaveEvent([[maybe_unused]] QEvent* event) {
|
||||
if (coord_label) {
|
||||
coord_label->clear();
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ GPUCommandStreamItemModel::GPUCommandStreamItemModel(QObject* parent)
|
||||
&GPUCommandStreamItemModel::OnGXCommandFinishedInternal);
|
||||
}
|
||||
|
||||
int GPUCommandStreamItemModel::rowCount(const QModelIndex& parent) const {
|
||||
int GPUCommandStreamItemModel::rowCount([[maybe_unused]] const QModelIndex& parent) const {
|
||||
return command_count;
|
||||
}
|
||||
|
||||
|
@ -16,11 +16,11 @@ BreakPointModel::BreakPointModel(std::shared_ptr<Pica::DebugContext> debug_conte
|
||||
at_breakpoint(debug_context->at_breakpoint),
|
||||
active_breakpoint(debug_context->active_breakpoint) {}
|
||||
|
||||
int BreakPointModel::columnCount(const QModelIndex& parent) const {
|
||||
int BreakPointModel::columnCount([[maybe_unused]] const QModelIndex& parent) const {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int BreakPointModel::rowCount(const QModelIndex& parent) const {
|
||||
int BreakPointModel::rowCount([[maybe_unused]] const QModelIndex& parent) const {
|
||||
return static_cast<int>(Pica::DebugContext::Event::NumEvents);
|
||||
}
|
||||
|
||||
|
@ -57,11 +57,11 @@ public:
|
||||
|
||||
GPUCommandListModel::GPUCommandListModel(QObject* parent) : QAbstractListModel(parent) {}
|
||||
|
||||
int GPUCommandListModel::rowCount(const QModelIndex& parent) const {
|
||||
int GPUCommandListModel::rowCount([[maybe_unused]] const QModelIndex& parent) const {
|
||||
return static_cast<int>(pica_trace.writes.size());
|
||||
}
|
||||
|
||||
int GPUCommandListModel::columnCount(const QModelIndex& parent) const {
|
||||
int GPUCommandListModel::columnCount([[maybe_unused]] const QModelIndex& parent) const {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@ -89,7 +89,8 @@ QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const {
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QVariant GPUCommandListModel::headerData(int section, Qt::Orientation orientation, int role) const {
|
||||
QVariant GPUCommandListModel::headerData(int section, [[maybe_unused]] Qt::Orientation orientation,
|
||||
int role) const {
|
||||
switch (role) {
|
||||
case Qt::DisplayRole: {
|
||||
switch (section) {
|
||||
|
@ -398,7 +398,6 @@ void GraphicsSurfaceWidget::Pick(int x, int y) {
|
||||
default:
|
||||
return QStringLiteral("Unhandled format");
|
||||
}
|
||||
return QString{};
|
||||
};
|
||||
|
||||
QString nibbles;
|
||||
|
@ -12,12 +12,12 @@
|
||||
#include <QMessageBox>
|
||||
#include <QPushButton>
|
||||
#include <boost/range/algorithm/copy.hpp>
|
||||
#include <nihstro/float24.h>
|
||||
#include "citra_qt/debugger/graphics/graphics_tracing.h"
|
||||
#include "common/common_types.h"
|
||||
#include "core/hw/gpu.h"
|
||||
#include "core/hw/lcd.h"
|
||||
#include "core/tracer/recorder.h"
|
||||
#include "nihstro/float24.h"
|
||||
#include "video_core/pica_state.h"
|
||||
|
||||
GraphicsTracingWidget::GraphicsTracingWidget(std::shared_ptr<Pica::DebugContext> debug_context,
|
||||
|
@ -29,15 +29,16 @@ using nihstro::SwizzlePattern;
|
||||
GraphicsVertexShaderModel::GraphicsVertexShaderModel(GraphicsVertexShaderWidget* parent)
|
||||
: QAbstractTableModel(parent), par(parent) {}
|
||||
|
||||
int GraphicsVertexShaderModel::columnCount(const QModelIndex& parent) const {
|
||||
int GraphicsVertexShaderModel::columnCount([[maybe_unused]] const QModelIndex& parent) const {
|
||||
return 3;
|
||||
}
|
||||
|
||||
int GraphicsVertexShaderModel::rowCount(const QModelIndex& parent) const {
|
||||
int GraphicsVertexShaderModel::rowCount([[maybe_unused]] const QModelIndex& parent) const {
|
||||
return static_cast<int>(par->info.code.size());
|
||||
}
|
||||
|
||||
QVariant GraphicsVertexShaderModel::headerData(int section, Qt::Orientation orientation,
|
||||
QVariant GraphicsVertexShaderModel::headerData(int section,
|
||||
[[maybe_unused]] Qt::Orientation orientation,
|
||||
int role) const {
|
||||
switch (role) {
|
||||
case Qt::DisplayRole: {
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
#include <QTreeView>
|
||||
#include <nihstro/parser_shbin.h>
|
||||
#include "citra_qt/debugger/graphics/graphics_breakpoint_observer.h"
|
||||
#include "nihstro/parser_shbin.h"
|
||||
#include "video_core/shader/debug_data.h"
|
||||
#include "video_core/shader/shader.h"
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <QBrush>
|
||||
#include <QString>
|
||||
#include <QTreeWidgetItem>
|
||||
#include <fmt/format.h>
|
||||
@ -72,16 +73,16 @@ void IPCRecorderWidget::OnEntryUpdated(IPCDebugger::RequestRecord record) {
|
||||
service = QStringLiteral("%1 (%2)").arg(service, record.is_hle ? tr("HLE") : tr("LLE"));
|
||||
}
|
||||
|
||||
QTreeWidgetItem item{
|
||||
QTreeWidgetItem entry{
|
||||
{QString::number(record.id), GetStatusStr(record), service, GetFunctionName(record)}};
|
||||
|
||||
const int row_id = record.id - id_offset;
|
||||
if (ui->main->invisibleRootItem()->childCount() > row_id) {
|
||||
records[row_id] = record;
|
||||
(*ui->main->invisibleRootItem()->child(row_id)) = item;
|
||||
(*ui->main->invisibleRootItem()->child(row_id)) = entry;
|
||||
} else {
|
||||
records.emplace_back(record);
|
||||
ui->main->invisibleRootItem()->addChild(new QTreeWidgetItem(item));
|
||||
ui->main->invisibleRootItem()->addChild(new QTreeWidgetItem(entry));
|
||||
}
|
||||
|
||||
if (record.status == IPCDebugger::RequestStatus::HLEUnimplemented ||
|
||||
@ -90,7 +91,7 @@ void IPCRecorderWidget::OnEntryUpdated(IPCDebugger::RequestRecord record) {
|
||||
|
||||
auto* item = ui->main->invisibleRootItem()->child(row_id);
|
||||
for (int column = 0; column < item->columnCount(); ++column) {
|
||||
item->setBackgroundColor(column, QColor::fromRgb(255, 0, 0));
|
||||
item->setBackground(column, QBrush(QColor::fromRgb(255, 0, 0)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,17 +24,17 @@ public:
|
||||
MicroProfileWidget(QWidget* parent = nullptr);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent* ev) override;
|
||||
void showEvent(QShowEvent* ev) override;
|
||||
void hideEvent(QHideEvent* ev) override;
|
||||
void paintEvent(QPaintEvent* event) override;
|
||||
void showEvent(QShowEvent* event) override;
|
||||
void hideEvent(QHideEvent* event) override;
|
||||
|
||||
void mouseMoveEvent(QMouseEvent* ev) override;
|
||||
void mousePressEvent(QMouseEvent* ev) override;
|
||||
void mouseReleaseEvent(QMouseEvent* ev) override;
|
||||
void wheelEvent(QWheelEvent* ev) override;
|
||||
void mouseMoveEvent(QMouseEvent* event) override;
|
||||
void mousePressEvent(QMouseEvent* event) override;
|
||||
void mouseReleaseEvent(QMouseEvent* event) override;
|
||||
void wheelEvent(QWheelEvent* event) override;
|
||||
|
||||
void keyPressEvent(QKeyEvent* ev) override;
|
||||
void keyReleaseEvent(QKeyEvent* ev) override;
|
||||
void keyPressEvent(QKeyEvent* event) override;
|
||||
void keyReleaseEvent(QKeyEvent* event) override;
|
||||
|
||||
private:
|
||||
/// This timer is used to redraw the widget's contents continuously. To save resources, it only
|
||||
@ -82,18 +82,18 @@ QAction* MicroProfileDialog::toggleViewAction() {
|
||||
return toggle_view_action;
|
||||
}
|
||||
|
||||
void MicroProfileDialog::showEvent(QShowEvent* ev) {
|
||||
void MicroProfileDialog::showEvent(QShowEvent* event) {
|
||||
if (toggle_view_action) {
|
||||
toggle_view_action->setChecked(isVisible());
|
||||
}
|
||||
QWidget::showEvent(ev);
|
||||
QWidget::showEvent(event);
|
||||
}
|
||||
|
||||
void MicroProfileDialog::hideEvent(QHideEvent* ev) {
|
||||
void MicroProfileDialog::hideEvent(QHideEvent* event) {
|
||||
if (toggle_view_action) {
|
||||
toggle_view_action->setChecked(isVisible());
|
||||
}
|
||||
QWidget::hideEvent(ev);
|
||||
QWidget::hideEvent(event);
|
||||
}
|
||||
|
||||
#if MICROPROFILE_ENABLED
|
||||
@ -112,7 +112,7 @@ MicroProfileWidget::MicroProfileWidget(QWidget* parent) : QWidget(parent) {
|
||||
connect(&update_timer, &QTimer::timeout, this, qOverload<>(&MicroProfileWidget::update));
|
||||
}
|
||||
|
||||
void MicroProfileWidget::paintEvent(QPaintEvent* ev) {
|
||||
void MicroProfileWidget::paintEvent([[maybe_unused]] QPaintEvent* event) {
|
||||
QPainter painter(this);
|
||||
|
||||
// The units used by Microprofile for drawing are based in pixels on a 96 dpi display.
|
||||
@ -132,51 +132,51 @@ void MicroProfileWidget::paintEvent(QPaintEvent* ev) {
|
||||
mp_painter = nullptr;
|
||||
}
|
||||
|
||||
void MicroProfileWidget::showEvent(QShowEvent* ev) {
|
||||
void MicroProfileWidget::showEvent(QShowEvent* event) {
|
||||
update_timer.start(15); // ~60 Hz
|
||||
QWidget::showEvent(ev);
|
||||
QWidget::showEvent(event);
|
||||
}
|
||||
|
||||
void MicroProfileWidget::hideEvent(QHideEvent* ev) {
|
||||
void MicroProfileWidget::hideEvent(QHideEvent* event) {
|
||||
update_timer.stop();
|
||||
QWidget::hideEvent(ev);
|
||||
QWidget::hideEvent(event);
|
||||
}
|
||||
|
||||
void MicroProfileWidget::mouseMoveEvent(QMouseEvent* ev) {
|
||||
MicroProfileMousePosition(ev->x() / x_scale, ev->y() / y_scale, 0);
|
||||
ev->accept();
|
||||
void MicroProfileWidget::mouseMoveEvent(QMouseEvent* event) {
|
||||
MicroProfileMousePosition(event->x() / x_scale, event->y() / y_scale, 0);
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void MicroProfileWidget::mousePressEvent(QMouseEvent* ev) {
|
||||
MicroProfileMousePosition(ev->x() / x_scale, ev->y() / y_scale, 0);
|
||||
MicroProfileMouseButton(ev->buttons() & Qt::LeftButton, ev->buttons() & Qt::RightButton);
|
||||
ev->accept();
|
||||
void MicroProfileWidget::mousePressEvent(QMouseEvent* event) {
|
||||
MicroProfileMousePosition(event->x() / x_scale, event->y() / y_scale, 0);
|
||||
MicroProfileMouseButton(event->buttons() & Qt::LeftButton, event->buttons() & Qt::RightButton);
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void MicroProfileWidget::mouseReleaseEvent(QMouseEvent* ev) {
|
||||
MicroProfileMousePosition(ev->x() / x_scale, ev->y() / y_scale, 0);
|
||||
MicroProfileMouseButton(ev->buttons() & Qt::LeftButton, ev->buttons() & Qt::RightButton);
|
||||
ev->accept();
|
||||
void MicroProfileWidget::mouseReleaseEvent(QMouseEvent* event) {
|
||||
MicroProfileMousePosition(event->x() / x_scale, event->y() / y_scale, 0);
|
||||
MicroProfileMouseButton(event->buttons() & Qt::LeftButton, event->buttons() & Qt::RightButton);
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void MicroProfileWidget::wheelEvent(QWheelEvent* ev) {
|
||||
MicroProfileMousePosition(ev->x() / x_scale, ev->y() / y_scale, ev->delta() / 120);
|
||||
ev->accept();
|
||||
void MicroProfileWidget::wheelEvent(QWheelEvent* event) {
|
||||
MicroProfileMousePosition(event->x() / x_scale, event->y() / y_scale, event->delta() / 120);
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void MicroProfileWidget::keyPressEvent(QKeyEvent* ev) {
|
||||
if (ev->key() == Qt::Key_Control) {
|
||||
void MicroProfileWidget::keyPressEvent(QKeyEvent* event) {
|
||||
if (event->key() == Qt::Key_Control) {
|
||||
// Inform MicroProfile that the user is holding Ctrl.
|
||||
MicroProfileModKey(1);
|
||||
}
|
||||
QWidget::keyPressEvent(ev);
|
||||
QWidget::keyPressEvent(event);
|
||||
}
|
||||
|
||||
void MicroProfileWidget::keyReleaseEvent(QKeyEvent* ev) {
|
||||
if (ev->key() == Qt::Key_Control) {
|
||||
void MicroProfileWidget::keyReleaseEvent(QKeyEvent* event) {
|
||||
if (event->key() == Qt::Key_Control) {
|
||||
MicroProfileModKey(0);
|
||||
}
|
||||
QWidget::keyReleaseEvent(ev);
|
||||
QWidget::keyReleaseEvent(event);
|
||||
}
|
||||
|
||||
// These functions are called by MicroProfileDraw to draw the interface elements on the screen.
|
||||
|
@ -17,8 +17,8 @@ public:
|
||||
QAction* toggleViewAction();
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent* ev) override;
|
||||
void hideEvent(QHideEvent* ev) override;
|
||||
void showEvent(QShowEvent* event) override;
|
||||
void hideEvent(QHideEvent* event) override;
|
||||
|
||||
private:
|
||||
QAction* toggle_view_action = nullptr;
|
||||
|
@ -83,9 +83,9 @@ std::vector<std::unique_ptr<WaitTreeThread>> WaitTreeItem::MakeThreadItemList()
|
||||
const auto& threads =
|
||||
Core::System::GetInstance().Kernel().GetThreadManager(i).GetThreadList();
|
||||
item_list.reserve(item_list.size() + threads.size());
|
||||
for (std::size_t i = 0; i < threads.size(); ++i) {
|
||||
item_list.push_back(std::make_unique<WaitTreeThread>(*threads[i]));
|
||||
item_list.back()->row = i;
|
||||
for (std::size_t j = 0; j < threads.size(); ++j) {
|
||||
item_list.push_back(std::make_unique<WaitTreeThread>(*threads[j]));
|
||||
item_list.back()->row = j;
|
||||
}
|
||||
}
|
||||
return item_list;
|
||||
|
@ -768,6 +768,6 @@ void GameListPlaceholder::onUpdateThemedIcons() {
|
||||
image->setPixmap(QIcon::fromTheme(QStringLiteral("plus_folder")).pixmap(200));
|
||||
}
|
||||
|
||||
void GameListPlaceholder::mouseDoubleClickEvent(QMouseEvent* event) {
|
||||
void GameListPlaceholder::mouseDoubleClickEvent([[maybe_unused]] QMouseEvent* event) {
|
||||
emit GameListPlaceholder::AddDirectory();
|
||||
}
|
||||
|
@ -3,21 +3,16 @@
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <unordered_map>
|
||||
#include <QBuffer>
|
||||
#include <QByteArray>
|
||||
#include <QGraphicsOpacityEffect>
|
||||
#include <QHBoxLayout>
|
||||
#include <QIODevice>
|
||||
#include <QImage>
|
||||
#include <QLabel>
|
||||
#include <QPainter>
|
||||
#include <QPalette>
|
||||
#include <QPixmap>
|
||||
#include <QProgressBar>
|
||||
#include <QPropertyAnimation>
|
||||
#include <QString>
|
||||
#include <QStyleOption>
|
||||
#include <QTime>
|
||||
#include <QtConcurrent/QtConcurrentRun>
|
||||
#include "citra_qt/loading_screen.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/loader/loader.h"
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
|
||||
namespace Loader {
|
||||
|
@ -1459,7 +1459,6 @@ void GMainWindow::InstallCIA(QStringList filepaths) {
|
||||
progress_bar->setMaximum(INT_MAX);
|
||||
|
||||
QtConcurrent::run([&, filepaths] {
|
||||
QString current_path;
|
||||
Service::AM::InstallStatus status;
|
||||
const auto cia_progress = [&](std::size_t written, std::size_t total) {
|
||||
emit UpdateProgress(written, total);
|
||||
@ -2102,15 +2101,15 @@ void GMainWindow::OnMouseActivity() {
|
||||
ShowMouseCursor();
|
||||
}
|
||||
|
||||
void GMainWindow::mouseMoveEvent(QMouseEvent* event) {
|
||||
void GMainWindow::mouseMoveEvent([[maybe_unused]] QMouseEvent* event) {
|
||||
OnMouseActivity();
|
||||
}
|
||||
|
||||
void GMainWindow::mousePressEvent(QMouseEvent* event) {
|
||||
void GMainWindow::mousePressEvent([[maybe_unused]] QMouseEvent* event) {
|
||||
OnMouseActivity();
|
||||
}
|
||||
|
||||
void GMainWindow::mouseReleaseEvent(QMouseEvent* event) {
|
||||
void GMainWindow::mouseReleaseEvent([[maybe_unused]] QMouseEvent* event) {
|
||||
OnMouseActivity();
|
||||
}
|
||||
|
||||
|
@ -232,9 +232,8 @@ bool MultiplayerState::OnCloseRoom() {
|
||||
return true;
|
||||
}
|
||||
// Save ban list
|
||||
if (auto room = Network::GetRoom().lock()) {
|
||||
UISettings::values.ban_list = std::move(room->GetBanList());
|
||||
}
|
||||
|
||||
room->Destroy();
|
||||
announce_multiplayer_session->Stop();
|
||||
LOG_DEBUG(Frontend, "Closed the room (as a server)");
|
||||
|
@ -133,8 +133,9 @@ bool UpdaterPrivate::StartUpdateCheck() {
|
||||
connect(main_process,
|
||||
static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished), this,
|
||||
&UpdaterPrivate::UpdaterReady, Qt::QueuedConnection);
|
||||
connect(main_process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
|
||||
this, &UpdaterPrivate::UpdaterError, Qt::QueuedConnection);
|
||||
connect(main_process,
|
||||
static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::errorOccurred), this,
|
||||
&UpdaterPrivate::UpdaterError, Qt::QueuedConnection);
|
||||
|
||||
main_process->start(QIODevice::ReadOnly);
|
||||
running = true;
|
||||
|
@ -4,8 +4,9 @@
|
||||
|
||||
#include "citra_qt/util/clickable_label.h"
|
||||
|
||||
ClickableLabel::ClickableLabel(QWidget* parent, Qt::WindowFlags f) : QLabel(parent) {}
|
||||
ClickableLabel::ClickableLabel(QWidget* parent, [[maybe_unused]] Qt::WindowFlags f)
|
||||
: QLabel(parent) {}
|
||||
|
||||
void ClickableLabel::mouseReleaseEvent(QMouseEvent* event) {
|
||||
void ClickableLabel::mouseReleaseEvent([[maybe_unused]] QMouseEvent* event) {
|
||||
emit clicked();
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ void CheatEngine::LoadCheatFile() {
|
||||
}
|
||||
}
|
||||
|
||||
void CheatEngine::RunCallback([[maybe_unused]] u64 userdata, int cycles_late) {
|
||||
void CheatEngine::RunCallback([[maybe_unused]] u64 userdata, s64 cycles_late) {
|
||||
{
|
||||
std::shared_lock<std::shared_mutex> lock(cheats_list_mutex);
|
||||
for (auto& cheat : cheats_list) {
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
|
||||
private:
|
||||
void LoadCheatFile();
|
||||
void RunCallback(u64 userdata, int cycles_late);
|
||||
void RunCallback(u64 userdata, s64 cycles_late);
|
||||
std::vector<std::shared_ptr<CheatBase>> cheats_list;
|
||||
mutable std::shared_mutex cheats_list_mutex;
|
||||
Core::TimingEventType* event;
|
||||
|
@ -198,7 +198,7 @@ GatewayCheat::CheatLine::CheatLine(const std::string& line) {
|
||||
address = first & 0x0FFFFFFF;
|
||||
value = std::stoul(line.substr(9, 8), 0, 16);
|
||||
cheat_line = line;
|
||||
} catch (const std::logic_error& e) {
|
||||
} catch (const std::logic_error&) {
|
||||
type = CheatType::Null;
|
||||
cheat_line = line;
|
||||
LOG_ERROR(Core_Cheats, "Cheat contains invalid line: {}", line);
|
||||
|
@ -15,8 +15,8 @@
|
||||
namespace FileSys::Patch {
|
||||
|
||||
bool ApplyIpsPatch(const std::vector<u8>& ips, std::vector<u8>& buffer) {
|
||||
u32 cursor = 5;
|
||||
u32 patch_length = ips.size() - 3;
|
||||
std::size_t cursor = 5;
|
||||
std::size_t patch_length = ips.size() - 3;
|
||||
std::string ips_header(ips.begin(), ips.begin() + 5);
|
||||
|
||||
if (ips_header != "PATCH") {
|
||||
@ -30,7 +30,7 @@ bool ApplyIpsPatch(const std::vector<u8>& ips, std::vector<u8>& buffer) {
|
||||
if (eof_check == "EOF")
|
||||
return false;
|
||||
|
||||
u32 offset = ips[cursor] << 16 | ips[cursor + 1] << 8 | ips[cursor + 2];
|
||||
std::size_t offset = ips[cursor] << 16 | ips[cursor + 1] << 8 | ips[cursor + 2];
|
||||
std::size_t length = ips[cursor + 3] << 8 | ips[cursor + 4];
|
||||
|
||||
// check for an rle record
|
||||
|
@ -459,8 +459,8 @@ void CSND_SND::ReleaseCapUnit(Kernel::HLERequestContext& ctx) {
|
||||
|
||||
void CSND_SND::FlushDataCache(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x9, 2, 2);
|
||||
const VAddr address = rp.Pop<u32>();
|
||||
const u32 size = rp.Pop<u32>();
|
||||
[[maybe_unused]] const VAddr address = rp.Pop<u32>();
|
||||
[[maybe_unused]] const u32 size = rp.Pop<u32>();
|
||||
const auto process = rp.PopObject<Kernel::Process>();
|
||||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
@ -472,8 +472,8 @@ void CSND_SND::FlushDataCache(Kernel::HLERequestContext& ctx) {
|
||||
|
||||
void CSND_SND::StoreDataCache(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0xA, 2, 2);
|
||||
const VAddr address = rp.Pop<u32>();
|
||||
const u32 size = rp.Pop<u32>();
|
||||
[[maybe_unused]] const VAddr address = rp.Pop<u32>();
|
||||
[[maybe_unused]] const u32 size = rp.Pop<u32>();
|
||||
const auto process = rp.PopObject<Kernel::Process>();
|
||||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
@ -485,8 +485,8 @@ void CSND_SND::StoreDataCache(Kernel::HLERequestContext& ctx) {
|
||||
|
||||
void CSND_SND::InvalidateDataCache(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0xB, 2, 2);
|
||||
const VAddr address = rp.Pop<u32>();
|
||||
const u32 size = rp.Pop<u32>();
|
||||
[[maybe_unused]] const VAddr address = rp.Pop<u32>();
|
||||
[[maybe_unused]] const u32 size = rp.Pop<u32>();
|
||||
const auto process = rp.PopObject<Kernel::Process>();
|
||||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
|
@ -202,8 +202,8 @@ void DSP_DSP::UnloadComponent(Kernel::HLERequestContext& ctx) {
|
||||
|
||||
void DSP_DSP::FlushDataCache(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x13, 2, 2);
|
||||
const VAddr address = rp.Pop<u32>();
|
||||
const u32 size = rp.Pop<u32>();
|
||||
[[maybe_unused]] const VAddr address = rp.Pop<u32>();
|
||||
[[maybe_unused]] const u32 size = rp.Pop<u32>();
|
||||
const auto process = rp.PopObject<Kernel::Process>();
|
||||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
@ -215,8 +215,8 @@ void DSP_DSP::FlushDataCache(Kernel::HLERequestContext& ctx) {
|
||||
|
||||
void DSP_DSP::InvalidateDataCache(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x14, 2, 2);
|
||||
const VAddr address = rp.Pop<u32>();
|
||||
const u32 size = rp.Pop<u32>();
|
||||
[[maybe_unused]] const VAddr address = rp.Pop<u32>();
|
||||
[[maybe_unused]] const u32 size = rp.Pop<u32>();
|
||||
const auto process = rp.PopObject<Kernel::Process>();
|
||||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
|
@ -236,7 +236,7 @@ private:
|
||||
template <SwizzlePattern::Selector (SwizzlePattern::*getter)(int) const>
|
||||
std::string GetSelectorSrc(const SwizzlePattern& pattern) {
|
||||
std::string out;
|
||||
for (std::size_t i = 0; i < 4; ++i) {
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
switch ((pattern.*getter)(i)) {
|
||||
case SwizzlePattern::Selector::x:
|
||||
out += 'x';
|
||||
|
@ -30,7 +30,7 @@ void from_json(const nlohmann::json& json, Room::Member& member) {
|
||||
try {
|
||||
member.username = json.at("username").get<std::string>();
|
||||
member.avatar_url = json.at("avatarUrl").get<std::string>();
|
||||
} catch (const nlohmann::detail::out_of_range& e) {
|
||||
} catch (const nlohmann::detail::out_of_range&) {
|
||||
member.username = member.avatar_url = "";
|
||||
LOG_DEBUG(Network, "Member \'{}\' isn't authenticated", member.nickname);
|
||||
}
|
||||
@ -59,7 +59,7 @@ void from_json(const nlohmann::json& json, Room& room) {
|
||||
room.name = json.at("name").get<std::string>();
|
||||
try {
|
||||
room.description = json.at("description").get<std::string>();
|
||||
} catch (const nlohmann::detail::out_of_range& e) {
|
||||
} catch (const nlohmann::detail::out_of_range&) {
|
||||
room.description = "";
|
||||
LOG_DEBUG(Network, "Room \'{}\' doesn't contain a description", room.name);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user