[nostalgia/core] Make display size function return common::Size instead of common::Point

This commit is contained in:
2021-03-31 02:29:25 -05:00
parent 445db97d31
commit 8f7de171af
5 changed files with 197 additions and 4 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ int getScreenHeight(Context*) {
return 160;
}
common::Point getScreenSize(Context*) {
common::Size getScreenSize(Context*) {
return {240, 160};
}
+2 -2
View File
@@ -9,7 +9,7 @@
#pragma once
#include <ox/std/types.hpp>
#include <nostalgia/common/point.hpp>
#include <nostalgia/common/size.hpp>
#include "color.hpp"
#include "context.hpp"
@@ -80,7 +80,7 @@ int getScreenWidth(Context *ctx);
int getScreenHeight(Context *ctx);
common::Point getScreenSize(Context *ctx);
common::Size getScreenSize(Context *ctx);
[[nodiscard]]
uint8_t bgStatus(Context *ctx);
+1 -1
View File
@@ -66,7 +66,7 @@ int getScreenHeight(Context *ctx) {
return y;
}
common::Point getScreenSize(Context *ctx) {
common::Size getScreenSize(Context *ctx) {
auto id = ctx->windowerData<SdlImplData>();
int x = 0, y = 0;
SDL_GetWindowSize(id->window, &x, &y);