mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-14 11:33:06 +00:00
yuzu/bootmanager: unsigned -> u32
Same thing (for platforms we support), less reading.
This commit is contained in:
parent
2575403acf
commit
0a650ec99e
|
@ -246,9 +246,9 @@ void GRenderWindow::PollEvents() {}
|
||||||
void GRenderWindow::OnFramebufferSizeChanged() {
|
void GRenderWindow::OnFramebufferSizeChanged() {
|
||||||
// Screen changes potentially incur a change in screen DPI, hence we should update the
|
// Screen changes potentially incur a change in screen DPI, hence we should update the
|
||||||
// framebuffer size
|
// framebuffer size
|
||||||
qreal pixelRatio = GetWindowPixelRatio();
|
const qreal pixel_ratio = GetWindowPixelRatio();
|
||||||
unsigned width = child->QPaintDevice::width() * pixelRatio;
|
const u32 width = child->QPaintDevice::width() * pixel_ratio;
|
||||||
unsigned height = child->QPaintDevice::height() * pixelRatio;
|
const u32 height = child->QPaintDevice::height() * pixel_ratio;
|
||||||
UpdateCurrentFramebufferLayout(width, height);
|
UpdateCurrentFramebufferLayout(width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,10 +294,10 @@ qreal GRenderWindow::GetWindowPixelRatio() const {
|
||||||
return windowHandle() ? windowHandle()->screen()->devicePixelRatio() : 1.0f;
|
return windowHandle() ? windowHandle()->screen()->devicePixelRatio() : 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::pair<unsigned, unsigned> GRenderWindow::ScaleTouch(const QPointF pos) const {
|
std::pair<u32, u32> GRenderWindow::ScaleTouch(const QPointF pos) const {
|
||||||
const qreal pixel_ratio = GetWindowPixelRatio();
|
const qreal pixel_ratio = GetWindowPixelRatio();
|
||||||
return {static_cast<unsigned>(std::max(std::round(pos.x() * pixel_ratio), qreal{0.0})),
|
return {static_cast<u32>(std::max(std::round(pos.x() * pixel_ratio), qreal{0.0})),
|
||||||
static_cast<unsigned>(std::max(std::round(pos.y() * pixel_ratio), qreal{0.0}))};
|
static_cast<u32>(std::max(std::round(pos.y() * pixel_ratio), qreal{0.0}))};
|
||||||
}
|
}
|
||||||
|
|
||||||
void GRenderWindow::closeEvent(QCloseEvent* event) {
|
void GRenderWindow::closeEvent(QCloseEvent* event) {
|
||||||
|
@ -353,7 +353,7 @@ void GRenderWindow::focusOutEvent(QFocusEvent* event) {
|
||||||
InputCommon::GetKeyboard()->ReleaseAllKeys();
|
InputCommon::GetKeyboard()->ReleaseAllKeys();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GRenderWindow::OnClientAreaResized(unsigned width, unsigned height) {
|
void GRenderWindow::OnClientAreaResized(u32 width, u32 height) {
|
||||||
NotifyClientAreaSizeChanged(std::make_pair(width, height));
|
NotifyClientAreaSizeChanged(std::make_pair(width, height));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -440,7 +440,7 @@ void GRenderWindow::CaptureScreenshot(u16 res_scale, const QString& screenshot_p
|
||||||
layout);
|
layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GRenderWindow::OnMinimalClientAreaChangeRequest(std::pair<unsigned, unsigned> minimal_size) {
|
void GRenderWindow::OnMinimalClientAreaChangeRequest(std::pair<u32, u32> minimal_size) {
|
||||||
setMinimumSize(minimal_size.first, minimal_size.second);
|
setMinimumSize(minimal_size.first, minimal_size.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,13 +133,13 @@ public:
|
||||||
QByteArray saveGeometry(); // overridden
|
QByteArray saveGeometry(); // overridden
|
||||||
|
|
||||||
qreal GetWindowPixelRatio() const;
|
qreal GetWindowPixelRatio() const;
|
||||||
std::pair<unsigned, unsigned> ScaleTouch(const QPointF pos) const;
|
std::pair<u32, u32> ScaleTouch(QPointF pos) const;
|
||||||
|
|
||||||
void closeEvent(QCloseEvent* event) override;
|
void closeEvent(QCloseEvent* event) override;
|
||||||
bool event(QEvent* event) override;
|
bool event(QEvent* event) override;
|
||||||
void focusOutEvent(QFocusEvent* event) override;
|
void focusOutEvent(QFocusEvent* event) override;
|
||||||
|
|
||||||
void OnClientAreaResized(unsigned width, unsigned height);
|
void OnClientAreaResized(u32 width, u32 height);
|
||||||
|
|
||||||
void InitRenderTarget();
|
void InitRenderTarget();
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ private:
|
||||||
void TouchUpdateEvent(const QTouchEvent* event);
|
void TouchUpdateEvent(const QTouchEvent* event);
|
||||||
void TouchEndEvent();
|
void TouchEndEvent();
|
||||||
|
|
||||||
void OnMinimalClientAreaChangeRequest(std::pair<unsigned, unsigned> minimal_size) override;
|
void OnMinimalClientAreaChangeRequest(std::pair<u32, u32> minimal_size) override;
|
||||||
|
|
||||||
QWidget* container = nullptr;
|
QWidget* container = nullptr;
|
||||||
GGLWidgetInternal* child = nullptr;
|
GGLWidgetInternal* child = nullptr;
|
||||||
|
|
Loading…
Reference in a new issue