Do not limit filesystem paths to 259 chars for MPQs, save files, and diablo.ini.
The MAX_PATH constant remains but now only limits path lengths within the MPQs.
Text mode is on by default. Calling SDL_StartTextInput() will start the
virual keyboard, but does not allow for a default value. Calling it as
well as switch_start_text_input() will start the keyboard a secound
time.
We still turn TextInput off on other platforms when it's not needed as
it can require additional resources.
Text mode is on by default. Calling SDL_StartTextInput() will start the
virual keyboard, but does not allow for a default value. Calling it as
well as switch_start_text_input() will start the keyboard a secound
time.
We still turn TextInput off on other platforms when it's not needed as
it can require additional resources.
The static bool means there's one copy of the variable per compilation
unit using the header. So changing its value in one compilation unit
doesn't affect the other compilation units. This is clearly not what is
wanted here.
Fixing this requires adding a CPP in SourceS. This is the first one
there, I hope it's not an issue. The sdl2_to_1_2_backports should only
be used with SDL1 so I only include it in the list of sources for SDL1
builds. I'm not familiar with cmake so I hope I don't do anything stupid
there!
The static bool means there's one copy of the variable per compilation
unit using the header. So changing its value in one compilation unit
doesn't affect the other compilation units. This is clearly not what is
wanted here.
Fixing this requires adding a CPP in SourceS. This is the first one
there, I hope it's not an issue. The sdl2_to_1_2_backports should only
be used with SDL1 so I only include it in the list of sources for SDL1
builds. I'm not familiar with cmake so I hope I don't do anything stupid
there!
Generator expressions are the only way to distinguish between build
types in multi-configuration builds (Visual Studio).
This adds generator expressions for some of build type dependent
values as a starting point.
See a more detailed explanation at:
https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#build-specification-with-generator-expressions
Notably:
> Some buildsystems generated by cmake(1) have a predetermined build-configuration set in the CMAKE_BUILD_TYPE variable. The buildsystem for the IDEs such as Visual Studio and Xcode are generated independent of the build-configuration, and the actual build configuration is not known until build-time. Therefore, code such as
>
> string(TOLOWER ${CMAKE_BUILD_TYPE} _type)
> if (_type STREQUAL debug)
> target_compile_definitions(exe1 PRIVATE DEBUG_BUILD)
> endif()
>
> may appear to work for Makefile Generators and Ninja generators, but is not portable to IDE generators.
* mpqapi FStreamWrapper: Fix silly bugs
* mpqapi cleanup
1. Do not rely on stream positions for getting the initial file size.
2. Remove most `seek` calls that were unnecessary.
3. Replace magic numbers with constants.
4. A class to manage archive lifetime and all associated data.
* Revert "Revert "mpqapi: Log all fstream calls""
This reverts commit e08007670f.
* mpqapi: Fix saves on Amiga
Works around https://github.com/bebbo/libnix/issues/30
* mpqapi: Fix logging format specifiers
This fixes fstream logging on Amiga
* mpqapi: Do not ResizeFile unless it was modified
* Add tests for file_util
* mpqapi: Replace malloc/free with new[]/delete[]
* mpqapi: Keep track of size instead of using tellp
This reduces log noise and reliance on `tellp`.
* mpqapi: Refactor mpqapi_write_file_contents
* mpqapi: Ensure we don't seekp beyond EOF on Amiga
* mpqapi: Minor fixes
* mpqapi: Fix FSTREAM_CHECK on Windows
* mpqapi: Remove undefined methods from header
Skip trailing slash when creating dirs and append it afterwards, as
trailing slash gets treated as '..' on Amiga.
Append /.local/share/ only on UNIX systems.