Browse Source

Update OSX and X11 shells.

Michael Ragazzon 6 years ago
parent
commit
0f20af4db7
2 changed files with 4 additions and 2 deletions
  1. 1 1
      Samples/shell/src/macosx/ShellMacOSX.cpp
  2. 3 1
      Samples/shell/src/x11/ShellX11.cpp

+ 1 - 1
Samples/shell/src/macosx/ShellMacOSX.cpp

@@ -96,7 +96,7 @@ Rml::Core::String Shell::FindSamplesRoot()
 		executable_file_name[0] = 0;
 
 	Rml::Core::String executable_path = Rml::Core::String(executable_file_name);
-	executable_path = executable_path.Substring(0, executable_path.RFind("/") + 1);
+	executable_path = executable_path.substr(0, executable_path.rfind("/") + 1);
 
 	delete[] executable_file_name;
 	CFRelease(executable_posix_file_name);

+ 3 - 1
Samples/shell/src/x11/ShellX11.cpp

@@ -40,6 +40,8 @@
 #include <stdio.h>
 #include <sys/stat.h>
 #include <limits.h>
+#include <stdio.h>
+#include <stdarg.h>
 
 static bool running = false;
 static int screen = -1;
@@ -87,7 +89,7 @@ Rml::Core::String Shell::FindSamplesRoot()
 		executable_file_name[len] = 0;
 	}
 	Rml::Core::String executable_path = Rml::Core::String(executable_file_name);
-	executable_path = executable_path.Substring(0, executable_path.RFind("/") + 1);
+	executable_path = executable_path.substr(0, executable_path.rfind("/") + 1);
 	
 	// for "../Samples/" to be valid we must be in the Build directory.
 	// NOTE: we can't use "../../Samples/" because it is valid only if: