SDL Keyboard Input, Unix File Loading and SDL Window Config (#232)

* SDL2 and Unix fix

SDL2 keyboard input, Unix filesystem fix, and SDL2 editor window config, CMake cache gitignore

* Adding comments to the SDL2 keycode fix

For a better understanding

* Slimming down SDL Unix path translation

* Static pathfile compile fix

More pathfile code fix for the compile to work

* Re: Static pathfile compile fix
This commit is contained in:
Megumumpkin
2021-02-08 01:55:29 +07:00
committed by GitHub
parent 79253e2645
commit fc63270b6e
5 changed files with 149 additions and 3 deletions
+6
View File
@@ -382,7 +382,13 @@ namespace wiHelper
bool FileRead(const std::string& fileName, std::vector<uint8_t>& data)
{
#ifndef PLATFORM_UWP
#ifdef SDL_FILESYSTEM_UNIX
std::string filepath = fileName;
std::replace(filepath.begin(), filepath.end(), '\\', '/');
ifstream file(filepath, ios::binary | ios::ate);
#else
ifstream file(fileName, ios::binary | ios::ate);
#endif // SDL_FILESYSTEM_UNIX
if (file.is_open())
{
size_t dataSize = (size_t)file.tellg();