mirror of
https://github.com/glest/glest-source.git
synced 2025-08-20 23:21:19 +02:00
- try to fix mac build
This commit is contained in:
@@ -450,7 +450,7 @@ MainWindow::MainWindow( std::pair<string,vector<string> > unitToLoad,
|
||||
DWORD dwDisposition;
|
||||
RegCreateKeyEx(HKEY_CURRENT_USER,subKey.c_str(),0, NULL, 0, KEY_ALL_ACCESS, NULL, &keyHandle, &dwDisposition);
|
||||
//Set the value.
|
||||
unique_ptr<wchar_t> wstr(Ansi2WideString(appPath.c_str()));
|
||||
auto_ptr<wchar_t> wstr(Ansi2WideString(appPath.c_str()));
|
||||
|
||||
wstring launchApp = wstring(wstr.get()) + L" \"%1\"";
|
||||
DWORD len = (DWORD)launchApp.length() + 1;
|
||||
@@ -849,7 +849,7 @@ void MainWindow::onMenuFileLoad(wxCommandEvent &event){
|
||||
const wxWX2MBbuf tmp_buf = wxConvCurrent->cWX2MB(fileDialog->GetPath());
|
||||
file = tmp_buf;
|
||||
|
||||
unique_ptr<wchar_t> wstr(Ansi2WideString(file.c_str()));
|
||||
auto_ptr<wchar_t> wstr(Ansi2WideString(file.c_str()));
|
||||
file = utf8_encode(wstr.get());
|
||||
#else
|
||||
file = (const char*)wxFNCONV(fileDialog->GetPath().c_str());
|
||||
@@ -884,7 +884,7 @@ void MainWindow::onMenuFileLoadParticleXML(wxCommandEvent &event){
|
||||
#ifdef WIN32
|
||||
const wxWX2MBbuf tmp_buf = wxConvCurrent->cWX2MB(fileDialog->GetPath());
|
||||
file = tmp_buf;
|
||||
unique_ptr<wchar_t> wstr(Ansi2WideString(file.c_str()));
|
||||
auto_ptr<wchar_t> wstr(Ansi2WideString(file.c_str()));
|
||||
file = utf8_encode(wstr.get());
|
||||
#else
|
||||
file = (const char*)wxFNCONV(fileDialog->GetPath().c_str());
|
||||
@@ -918,7 +918,7 @@ void MainWindow::onMenuFileLoadProjectileParticleXML(wxCommandEvent &event){
|
||||
#ifdef WIN32
|
||||
const wxWX2MBbuf tmp_buf = wxConvCurrent->cWX2MB(fileDialog->GetPath());
|
||||
file = tmp_buf;
|
||||
unique_ptr<wchar_t> wstr(Ansi2WideString(file.c_str()));
|
||||
auto_ptr<wchar_t> wstr(Ansi2WideString(file.c_str()));
|
||||
file = utf8_encode(wstr.get());
|
||||
#else
|
||||
file = (const char*)wxFNCONV(fileDialog->GetPath().c_str());
|
||||
@@ -953,7 +953,7 @@ void MainWindow::onMenuFileLoadSplashParticleXML(wxCommandEvent &event){
|
||||
const wxWX2MBbuf tmp_buf = wxConvCurrent->cWX2MB(fileDialog->GetPath());
|
||||
file = tmp_buf;
|
||||
|
||||
unique_ptr<wchar_t> wstr(Ansi2WideString(file.c_str()));
|
||||
auto_ptr<wchar_t> wstr(Ansi2WideString(file.c_str()));
|
||||
file = utf8_encode(wstr.get());
|
||||
#else
|
||||
file = (const char*)wxFNCONV(fileDialog->GetPath().c_str());
|
||||
@@ -2158,7 +2158,7 @@ bool App::OnInit() {
|
||||
for(unsigned int i = 0; i < autoScreenShotParams.size(); ++i) {
|
||||
|
||||
#ifdef WIN32
|
||||
unique_ptr<wchar_t> wstr(Ansi2WideString(autoScreenShotParams[i].c_str()));
|
||||
auto_ptr<wchar_t> wstr(Ansi2WideString(autoScreenShotParams[i].c_str()));
|
||||
autoScreenShotParams[i] = utf8_encode(wstr.get());
|
||||
#endif
|
||||
|
||||
@@ -2203,14 +2203,14 @@ bool App::OnInit() {
|
||||
if(delimitedList.size() >= 2) {
|
||||
unitToLoad.first = delimitedList[0];
|
||||
#ifdef WIN32
|
||||
unique_ptr<wchar_t> wstr(Ansi2WideString(unitToLoad.first.c_str()));
|
||||
auto_ptr<wchar_t> wstr(Ansi2WideString(unitToLoad.first.c_str()));
|
||||
unitToLoad.first = utf8_encode(wstr.get());
|
||||
#endif
|
||||
|
||||
for(unsigned int i = 1; i < delimitedList.size(); ++i) {
|
||||
string value = delimitedList[i];
|
||||
#ifdef WIN32
|
||||
unique_ptr<wchar_t> wstr(Ansi2WideString(value.c_str()));
|
||||
auto_ptr<wchar_t> wstr(Ansi2WideString(value.c_str()));
|
||||
value = utf8_encode(wstr.get());
|
||||
#endif
|
||||
|
||||
@@ -2249,7 +2249,7 @@ bool App::OnInit() {
|
||||
string customPathValue = paramPartTokens[1];
|
||||
modelPath = customPathValue;
|
||||
#ifdef WIN32
|
||||
unique_ptr<wchar_t> wstr(Ansi2WideString(modelPath.c_str()));
|
||||
auto_ptr<wchar_t> wstr(Ansi2WideString(modelPath.c_str()));
|
||||
modelPath = utf8_encode(wstr.get());
|
||||
#endif
|
||||
|
||||
@@ -2279,7 +2279,7 @@ bool App::OnInit() {
|
||||
string customPathValue = paramPartTokens[1];
|
||||
particlePath = customPathValue;
|
||||
#ifdef WIN32
|
||||
unique_ptr<wchar_t> wstr(Ansi2WideString(particlePath.c_str()));
|
||||
auto_ptr<wchar_t> wstr(Ansi2WideString(particlePath.c_str()));
|
||||
particlePath = utf8_encode(wstr.get());
|
||||
#endif
|
||||
}
|
||||
@@ -2307,7 +2307,7 @@ bool App::OnInit() {
|
||||
string customPathValue = paramPartTokens[1];
|
||||
projectileParticlePath = customPathValue;
|
||||
#ifdef WIN32
|
||||
unique_ptr<wchar_t> wstr(Ansi2WideString(projectileParticlePath.c_str()));
|
||||
auto_ptr<wchar_t> wstr(Ansi2WideString(projectileParticlePath.c_str()));
|
||||
projectileParticlePath = utf8_encode(wstr.get());
|
||||
#endif
|
||||
}
|
||||
@@ -2335,7 +2335,7 @@ bool App::OnInit() {
|
||||
string customPathValue = paramPartTokens[1];
|
||||
splashParticlePath = customPathValue;
|
||||
#ifdef WIN32
|
||||
unique_ptr<wchar_t> wstr(Ansi2WideString(splashParticlePath.c_str()));
|
||||
auto_ptr<wchar_t> wstr(Ansi2WideString(splashParticlePath.c_str()));
|
||||
splashParticlePath = utf8_encode(wstr.get());
|
||||
#endif
|
||||
}
|
||||
@@ -2494,7 +2494,7 @@ bool App::OnInit() {
|
||||
#ifdef WIN32
|
||||
const wxWX2MBbuf tmp_buf = wxConvCurrent->cWX2MB(wxFNCONV(argv[1]));
|
||||
modelPath = tmp_buf;
|
||||
unique_ptr<wchar_t> wstr(Ansi2WideString(modelPath.c_str()));
|
||||
auto_ptr<wchar_t> wstr(Ansi2WideString(modelPath.c_str()));
|
||||
modelPath = utf8_encode(wstr.get());
|
||||
#else
|
||||
modelPath = wxFNCONV(argv[1]);
|
||||
@@ -2524,7 +2524,7 @@ bool App::OnInit() {
|
||||
const wxWX2MBbuf tmp_buf = wxConvCurrent->cWX2MB(wxFNCONV(exe_path));
|
||||
string appPath = tmp_buf;
|
||||
|
||||
unique_ptr<wchar_t> wstr(Ansi2WideString(appPath.c_str()));
|
||||
auto_ptr<wchar_t> wstr(Ansi2WideString(appPath.c_str()));
|
||||
appPath = utf8_encode(wstr.get());
|
||||
#else
|
||||
string appPath(wxFNCONV(exe_path));
|
||||
|
Reference in New Issue
Block a user