summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/yuzu/bootmanager.cpp16
-rw-r--r--src/yuzu/bootmanager.h6
2 files changed, 11 insertions, 11 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index 9d5044b8f..05b2c2bea 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -246,9 +246,9 @@ void GRenderWindow::PollEvents() {}
246void GRenderWindow::OnFramebufferSizeChanged() { 246void GRenderWindow::OnFramebufferSizeChanged() {
247 // Screen changes potentially incur a change in screen DPI, hence we should update the 247 // Screen changes potentially incur a change in screen DPI, hence we should update the
248 // framebuffer size 248 // framebuffer size
249 qreal pixelRatio = GetWindowPixelRatio(); 249 const qreal pixel_ratio = GetWindowPixelRatio();
250 unsigned width = child->QPaintDevice::width() * pixelRatio; 250 const u32 width = child->QPaintDevice::width() * pixel_ratio;
251 unsigned height = child->QPaintDevice::height() * pixelRatio; 251 const u32 height = child->QPaintDevice::height() * pixel_ratio;
252 UpdateCurrentFramebufferLayout(width, height); 252 UpdateCurrentFramebufferLayout(width, height);
253} 253}
254 254
@@ -294,10 +294,10 @@ qreal GRenderWindow::GetWindowPixelRatio() const {
294 return windowHandle() ? windowHandle()->screen()->devicePixelRatio() : 1.0f; 294 return windowHandle() ? windowHandle()->screen()->devicePixelRatio() : 1.0f;
295} 295}
296 296
297std::pair<unsigned, unsigned> GRenderWindow::ScaleTouch(const QPointF pos) const { 297std::pair<u32, u32> GRenderWindow::ScaleTouch(const QPointF pos) const {
298 const qreal pixel_ratio = GetWindowPixelRatio(); 298 const qreal pixel_ratio = GetWindowPixelRatio();
299 return {static_cast<unsigned>(std::max(std::round(pos.x() * pixel_ratio), qreal{0.0})), 299 return {static_cast<u32>(std::max(std::round(pos.x() * pixel_ratio), qreal{0.0})),
300 static_cast<unsigned>(std::max(std::round(pos.y() * pixel_ratio), qreal{0.0}))}; 300 static_cast<u32>(std::max(std::round(pos.y() * pixel_ratio), qreal{0.0}))};
301} 301}
302 302
303void GRenderWindow::closeEvent(QCloseEvent* event) { 303void GRenderWindow::closeEvent(QCloseEvent* event) {
@@ -353,7 +353,7 @@ void GRenderWindow::focusOutEvent(QFocusEvent* event) {
353 InputCommon::GetKeyboard()->ReleaseAllKeys(); 353 InputCommon::GetKeyboard()->ReleaseAllKeys();
354} 354}
355 355
356void GRenderWindow::OnClientAreaResized(unsigned width, unsigned height) { 356void GRenderWindow::OnClientAreaResized(u32 width, u32 height) {
357 NotifyClientAreaSizeChanged(std::make_pair(width, height)); 357 NotifyClientAreaSizeChanged(std::make_pair(width, height));
358} 358}
359 359
@@ -440,7 +440,7 @@ void GRenderWindow::CaptureScreenshot(u16 res_scale, const QString& screenshot_p
440 layout); 440 layout);
441} 441}
442 442
443void GRenderWindow::OnMinimalClientAreaChangeRequest(std::pair<unsigned, unsigned> minimal_size) { 443void GRenderWindow::OnMinimalClientAreaChangeRequest(std::pair<u32, u32> minimal_size) {
444 setMinimumSize(minimal_size.first, minimal_size.second); 444 setMinimumSize(minimal_size.first, minimal_size.second);
445} 445}
446 446
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h
index 5a1ebd0fe..85c080000 100644
--- a/src/yuzu/bootmanager.h
+++ b/src/yuzu/bootmanager.h
@@ -133,13 +133,13 @@ public:
133 QByteArray saveGeometry(); // overridden 133 QByteArray saveGeometry(); // overridden
134 134
135 qreal GetWindowPixelRatio() const; 135 qreal GetWindowPixelRatio() const;
136 std::pair<unsigned, unsigned> ScaleTouch(const QPointF pos) const; 136 std::pair<u32, u32> ScaleTouch(QPointF pos) const;
137 137
138 void closeEvent(QCloseEvent* event) override; 138 void closeEvent(QCloseEvent* event) override;
139 bool event(QEvent* event) override; 139 bool event(QEvent* event) override;
140 void focusOutEvent(QFocusEvent* event) override; 140 void focusOutEvent(QFocusEvent* event) override;
141 141
142 void OnClientAreaResized(unsigned width, unsigned height); 142 void OnClientAreaResized(u32 width, u32 height);
143 143
144 void InitRenderTarget(); 144 void InitRenderTarget();
145 145
@@ -162,7 +162,7 @@ private:
162 void TouchUpdateEvent(const QTouchEvent* event); 162 void TouchUpdateEvent(const QTouchEvent* event);
163 void TouchEndEvent(); 163 void TouchEndEvent();
164 164
165 void OnMinimalClientAreaChangeRequest(std::pair<unsigned, unsigned> minimal_size) override; 165 void OnMinimalClientAreaChangeRequest(std::pair<u32, u32> minimal_size) override;
166 166
167 QWidget* container = nullptr; 167 QWidget* container = nullptr;
168 GGLWidgetInternal* child = nullptr; 168 GGLWidgetInternal* child = nullptr;