Skip to content

Commit

Permalink
WinRT: Prefer Ogre::filesystemPathFromString to convert from narrow s…
Browse files Browse the repository at this point in the history
…tring encoding to UTF-16.

Currently CP_UTF8 is selected as narrow pathes encoding via #define _OGRE_FILESYSTEM_ARCHIVE_UNICODE, so behavior was not changed
  • Loading branch information
eugenegff committed Oct 5, 2023
1 parent 7f381c6 commit 07303b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion OgreMain/include/OgreDynLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ typedef struct HINSTANCE__ *hInstance;

#elif OGRE_PLATFORM == OGRE_PLATFORM_WINRT
# define DYNLIB_HANDLE hInstance
# define DYNLIB_LOAD( a ) LoadPackagedLibrary( UTFString( a ).asWStr_c_str(), 0 )
# define DYNLIB_LOAD( a ) LoadPackagedLibrary( Ogre::fileSystemPathFromString( a ).c_str(), 0 )
# define DYNLIB_GETSYM( a, b ) GetProcAddress( a, b )
# define DYNLIB_UNLOAD( a ) !FreeLibrary( a )

Expand Down
2 changes: 1 addition & 1 deletion OgreMain/src/OgreDynLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ THE SOFTWARE.
#endif

#if OGRE_PLATFORM == OGRE_PLATFORM_WINRT
# include "OgreUTFString.h"
# include "OgreFileSystem.h"
#endif

#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS
Expand Down

0 comments on commit 07303b4

Please sign in to comment.