Skip to content

Conversation

@briaguya0
Copy link
Contributor

@briaguya0 briaguya0 commented May 18, 2022

This PR makes it so the windowed resolution set in the .ini is respected when opening soh with sdl/opengl

I only modified the directx code enough to not break the build, not enough to implement the feature (i'm on linux)

@briaguya0
Copy link
Contributor Author

so it looks like those values aren't making it through to

gfx_wapi->init(game_name, start_in_fullscreen);

which goes to
wnd = SDL_CreateWindow(title, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
window_width, window_height, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE);

which uses window_width and window_height which are set here
static unsigned int window_width = DESIRED_SCREEN_WIDTH;
static unsigned int window_height = DESIRED_SCREEN_HEIGHT;

@briaguya0
Copy link
Contributor Author

so now the window is being set to the resolution from the .ini, but the game is still rendered at 640x480, i'm thinking it might have something to do with

static void gfx_sdl_get_dimensions(uint32_t *width, uint32_t *height) {
*width = window_width;
*height = window_height;
}

but i'm not sure what to do about it

@briaguya0 briaguya0 marked this pull request as ready for review May 18, 2022 22:18
@briaguya0
Copy link
Contributor Author

when i forked originally i forked from random's linux branch, i'm deleting my old fork and forking from HarbourMasters, so here's a patch file from this PR just in case the code disappears 374.patch.zip

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant