Skip to content

Commit

Permalink
Fixed bug in windows version
Browse files Browse the repository at this point in the history
  • Loading branch information
yvt committed Apr 2, 2014
1 parent 78adfb6 commit 5abca86
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(OpenSpades)

set(OpenSpades_VERSION_MAJOR 0)
set(OpenSpades_VERSION_MINOR 0)
set(OpenSpades_VERSION_REVISION 10)
set(OpenSpades_VERSION_REVISION 11)

set(OS_BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR})

Expand Down
2 changes: 1 addition & 1 deletion Sources/Audio/YsrDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#if defined(__APPLE__)
SPADES_SETTING(s_ysrDriver, "libysrspades.dylib");
#elif defined(WIN32)
SPADES_SETTING(s_ysrDriver, "YSR for OpenSpades.dll");
SPADES_SETTING(s_ysrDriver, "YSRSpades.dll");
#else
SPADES_SETTING(s_ysrDriver, "libysrspades.so");
#endif
Expand Down
4 changes: 2 additions & 2 deletions Sources/Core/FltkPreferenceImporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace spades {
#ifdef WIN32
static std::wstring Utf8ToWString(const char *s) {
auto *ws = (WCHAR*)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", (char *)(s), SDL_strlen(s)+1);
if(ws) return ""L;
if(!ws) return L"";
std::wstring wss(ws);
SDL_free(ws);
return wss;
Expand Down Expand Up @@ -141,7 +141,7 @@ namespace spades {
SPLog("Moving %s to %s", path.c_str(), (path + "-old").c_str());
#ifdef WIN32
auto s = Utf8ToWString(path.c_str());
Move(s.c_str(), (s + "-old"L).c_str());
MoveFileW(s.c_str(), (s + L"-old").c_str());
#else
rename(path.c_str(), (path + "-old").c_str());
#endif
Expand Down

0 comments on commit 5abca86

Please sign in to comment.