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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user