Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for older VS versions, make sure dhewm3log.txt was created on Windows #642

Merged
merged 2 commits into from
Jan 18, 2025

Conversation

DanielGibson
Copy link
Member

#544 has shown that dhewm3 will silently fail to start on Windows if dhewm3log.txt can't be created (for example because Documents/My Games/dhewm3/ can't be written to) and that debugging that is a major PITA.
Now a Windows MessageBox with an error message is shown.

Also fixed an issue that prevented VS2017 from compiling dhewm3 with ImGui enabled.

At least VS2017 doesn't like the big string literal of
proggyvector_font_base85.h (its limit is 64KB, Error C1091), so go back to
using proggyvector_font.h (which contains an int32 array) for MSVC..

Keep the base85 version around for proper compilers, because (unlike
the non-base85 version of the font) it works on Big Endian machines.

It seems like VS2022, maybe even some point release of VS2019 removed this
limitation (our CI build succeeds), but I couldn't find any details about
that change.
If it (or Documents/My Games/dhewm3/) can't be created, show a windows
MessageBox with an error message and exit.

Would've made dhewm#544 easier to figure out
@DanielGibson DanielGibson merged commit eefdd83 into dhewm:master Jan 18, 2025
4 checks passed
} else {
char msg[2048];
D3_snprintfC99( msg, sizeof(msg), "Failed to create '%s',\n error number is %d (%s)\nIs Documents/My Games/dhewm3/ write protected?",
stdoutPath, errno, strerror(errno) );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy-paste error, wrong variable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good find!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants