Added table resolution and UI scale options.

gdrv: blit directly to backing store of vScreen texture.
Added missing cheat_bump_rank sub, oops.
Fixed some warnings.
This commit is contained in:
Muzychenko Andrey
2021-09-22 15:50:07 +03:00
parent c63c6701ac
commit 4c196a9290
21 changed files with 138 additions and 183 deletions
+1 -38
View File
@@ -12,7 +12,6 @@ int fullscrn::screen_mode;
int fullscrn::display_changed;
int fullscrn::resolution = 0;
int fullscrn::maxResolution = 0;
const resolution_info fullscrn::resolution_array[3] =
{
{640, 480, 600, 416, 501},
@@ -103,43 +102,7 @@ void fullscrn::SetResolution(int value)
int fullscrn::GetMaxResolution()
{
return maxResolution;
}
void fullscrn::SetMaxResolution(int value)
{
assertm(value >= 0 && value <= 2, "Resolution value out of bounds");
maxResolution = value;
}
int fullscrn::get_max_supported_resolution()
{
if (!pb::FullTiltMode)
return 0;
int width = 0, height = 0;
get_screen_resolution(&width, &height);
auto result = 0;
for (auto index = 1; index < 3; ++index)
{
auto resPtr = &resolution_array[index];
if (resPtr->ScreenWidth <= width && resPtr->ScreenHeight <= height)
result = index;
}
return result;
}
int fullscrn::get_screen_resolution(int* width, int* height)
{
SDL_DisplayMode dm;
if (SDL_GetDesktopDisplayMode(0, &dm) == 0)
{
*width = dm.w;
*height = dm.h;
return 0;
}
return 1;
return pb::FullTiltMode ? 2 : 0;
}
void fullscrn::window_size_changed()