Browse Source

Fixed windows build.

Branimir Karadžić 8 years ago
parent
commit
ac33b32cb5
2 changed files with 8 additions and 8 deletions
  1. 4 4
      examples/common/entry/entry.cpp
  2. 4 4
      tools/texturev/texturev.cpp

+ 4 - 4
examples/common/entry/entry.cpp

@@ -62,10 +62,10 @@ namespace entry
 		typedef bx::FileReader super;
 		typedef bx::FileReader super;
 
 
 	public:
 	public:
-		virtual bool open(const char* _filePath, bx::Error* _err) BX_OVERRIDE
+		virtual bool open(const bx::FilePath& _filePath, bx::Error* _err) BX_OVERRIDE
 		{
 		{
 			String filePath(s_currentDir);
 			String filePath(s_currentDir);
-			filePath.append(_filePath);
+			filePath.append(_filePath.get() );
 			return super::open(filePath.getPtr(), _err);
 			return super::open(filePath.getPtr(), _err);
 		}
 		}
 	};
 	};
@@ -75,10 +75,10 @@ namespace entry
 		typedef bx::FileWriter super;
 		typedef bx::FileWriter super;
 
 
 	public:
 	public:
-		virtual bool open(const char* _filePath, bool _append, bx::Error* _err) BX_OVERRIDE
+		virtual bool open(const bx::FilePath& _filePath, bool _append, bx::Error* _err) BX_OVERRIDE
 		{
 		{
 			String filePath(s_currentDir);
 			String filePath(s_currentDir);
-			filePath.append(_filePath);
+			filePath.append(_filePath.get() );
 			return super::open(filePath.getPtr(), _append, _err);
 			return super::open(filePath.getPtr(), _append, _err);
 		}
 		}
 	};
 	};

+ 4 - 4
tools/texturev/texturev.cpp

@@ -712,8 +712,8 @@ void setGeometry(
 			}
 			}
 			else
 			else
 			{
 			{
-				const float sx = _width;
-				const float sy = _height;
+				const float sx = float(_width);
+				const float sy = float(_height);
 				const float px = float(_x) - sx/2.0f;
 				const float px = float(_x) - sx/2.0f;
 				const float py = float(_y);
 				const float py = float(_y);
 
 
@@ -855,10 +855,10 @@ void associate()
 		if (err.isOk() )
 		if (err.isOk() )
 		{
 		{
 			std::string cmd;
 			std::string cmd;
-			bx::stringPrintf(cmd, "regedit.exe /s %s", temp);
+			bx::stringPrintf(cmd, "/s %s", temp);
 
 
 			bx::ProcessReader reader;
 			bx::ProcessReader reader;
-			if (bx::open(&reader, cmd.c_str(), &err) )
+			if (bx::open(&reader, "regedit.exe", cmd.c_str(), &err) )
 			{
 			{
 				bx::close(&reader);
 				bx::close(&reader);
 			}
 			}