diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-09 19:04:26 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-09 19:04:26 +0000 |
commit | df7eb49c9f3b288e5cc01c2e236febefe3fb120e (patch) | |
tree | 2e1b5f1f86156e429e112dd3d4f53ea84a29e16d /o3d/converter | |
parent | afdcd4010a449e3d89a37b025e5970173b85a180 (diff) | |
download | chromium_src-df7eb49c9f3b288e5cc01c2e236febefe3fb120e.zip chromium_src-df7eb49c9f3b288e5cc01c2e236febefe3fb120e.tar.gz chromium_src-df7eb49c9f3b288e5cc01c2e236febefe3fb120e.tar.bz2 |
Revert o3d part of recent commit, since they're using a different base.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55433 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/converter')
-rw-r--r-- | o3d/converter/cross/converter_main.cc | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/o3d/converter/cross/converter_main.cc b/o3d/converter/cross/converter_main.cc index ddfc6e9..ee819a9 100644 --- a/o3d/converter/cross/converter_main.cc +++ b/o3d/converter/cross/converter_main.cc @@ -45,6 +45,9 @@ #include "converter/cross/converter.h" #include "utils/cross/file_path_utils.h" +using std::string; +using std::wstring; + #if defined(OS_WIN) int wmain(int argc, wchar_t **argv) { // On Windows, CommandLine::Init ignores its arguments and uses @@ -132,21 +135,23 @@ int CrossMain(int argc, char**argv) { options.convert_dds_to_png = command_line->HasSwitch("convert-dds-to-png"); options.convert_cg_to_glsl = command_line->HasSwitch("convert-cg-to-glsl"); options.converter_tool = command_line->HasSwitch("converter-tool") ? - command_line->GetSwitchValuePath("converter-tool") : converter_tool; + o3d::WideToFilePath(command_line->GetSwitchValue("converter-tool")) : + converter_tool; if (command_line->HasSwitch("base-path")) { - options.base_path = command_line->GetSwitchValuePath("base-path"); + options.base_path = o3d::WideToFilePath( + command_line->GetSwitchValue("base-path")); } if (command_line->HasSwitch("asset-paths")) { - std::vector<CommandLine::StringType> paths; - SplitString(command_line->GetSwitchValueNative("asset-paths"), ',', &paths); + std::vector<std::wstring> paths; + SplitString(command_line->GetSwitchValue("asset-paths"), ',', &paths); for (size_t ii = 0; ii < paths.size(); ++ii) { - options.file_paths.push_back(FilePath(paths[ii])); + options.file_paths.push_back(o3d::WideToFilePath(paths[ii])); } } if (command_line->HasSwitch("up-axis")) { - std::string up_axis_string = command_line->GetSwitchValueASCII("up-axis"); + wstring up_axis_string = command_line->GetSwitchValue("up-axis"); int x, y, z; - if (sscanf(up_axis_string.c_str(), "%d,%d,%d", &x, &y, &z) != 3) { + if (swscanf(up_axis_string.c_str(), L"%d,%d,%d", &x, &y, &z) != 3) { std::cerr << "Invalid --up-axis value. Should be --up-axis=x,y,z\n"; return EXIT_FAILURE; } |