Skip to content

Commit

Permalink
Some more fixes in mesh_xml.cpp and winsys.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengtuggy committed Apr 30, 2024
1 parent 56c78a6 commit 5eb9fbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions engine/src/gfx/mesh_xml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1323,11 +1323,10 @@ vector<Mesh *> Mesh::LoadMeshes(const char *filename,
hash_name = VSFileSystem::GetSharedMeshHashName(filename, scale, faction);
oldmesh = bfxmHashTable.Get(hash_name);
}
if (0 != oldmesh) {
if (oldmesh && !oldmesh->empty() && oldmesh->size() < UINT32_MAX) {
vector<Mesh *> ret;
for (unsigned int i = 0; i < oldmesh->size(); ++i) {
for (auto m : *oldmesh) {
ret.push_back(new Mesh());
Mesh *m = (*oldmesh)[i];
ret.back()->LoadExistant(m->orig ? m->orig : m);
}
return ret;
Expand Down
4 changes: 2 additions & 2 deletions engine/src/gldrv/winsys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ void winsys_warp_pointer(int x, int y) {
* \date Modified: 2021-09-07 - stephengtuggy
*/
static bool setup_sdl_video_mode() {
Uint32 video_flags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI;
Uint32 video_flags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN; // | SDL_WINDOW_ALLOW_HIGHDPI;
int bpp = 0; // Bits per pixel?
int width, height;
if (gl_options.fullscreen) {
Expand Down Expand Up @@ -334,7 +334,7 @@ static bool setup_sdl_video_mode() {
void winsys_init(int *argc, char **argv, char const *window_title, char const *icon_title) {
keepRunning = true;

Uint32 sdl_flags = SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_TIMER | SDL_INIT_EVENTS;
Uint32 sdl_flags = SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_EVENTS;
g_game.x_resolution = game_options()->x_resolution;
g_game.y_resolution = game_options()->y_resolution;
// gl_options.fullscreen = game_options()->fullscreen;
Expand Down

0 comments on commit 5eb9fbf

Please sign in to comment.