Bladeren bron

Merge branch 'master' of github.com:taylor001/crown

Daniele Bartolini 10 jaren geleden
bovenliggende
commit
97768dd09a
3 gewijzigde bestanden met toevoegingen van 13 en 14 verwijderingen
  1. 2 7
      src/device.cpp
  2. 0 2
      src/device.h
  3. 11 5
      src/resource/lua_resource.cpp

+ 2 - 7
src/device.cpp

@@ -168,12 +168,6 @@ void Device::unpause()
 	CE_LOGI("Engine unpaused.");
 }
 
-void Device::update_resolution(uint16_t width, uint16_t height)
-{
-	_width = width;
-	_height = height;
-}
-
 void Device::resolution(uint16_t& width, uint16_t& height)
 {
 	width = _width;
@@ -390,7 +384,8 @@ bool Device::process_events()
 			case OsEvent::METRICS:
 			{
 				const OsMetricsEvent& ev = event.metrics;
-				update_resolution(ev.width, ev.height);
+				_width = ev.width;
+				_height = ev.height;
 				bgfx::reset(ev.width, ev.height, BGFX_RESET_VSYNC);
 				break;
 			}

+ 0 - 2
src/device.h

@@ -72,8 +72,6 @@ struct Device
 	/// Unpauses the engine.
 	void unpause();
 
-	void update_resolution(uint16_t width, uint16_t height);
-
 	/// Returns the main window resolution.
 	void resolution(uint16_t& width, uint16_t& height);
 

+ 11 - 5
src/resource/lua_resource.cpp

@@ -11,6 +11,16 @@
 #include "array.h"
 #include "compile_options.h"
 
+#define LUAJIT_NAME "luajit"
+
+#if CROWN_PLATFORM_WINDOWS
+	#define EXE ".exe"
+#else
+ 	#define EXE ""
+#endif // CROWN_PLATFORM_WINDOWS
+
+#define LUAJIT_EXE LUAJIT_NAME EXE
+
 #if CROWN_DEBUG
 	#define LUAJIT_FLAGS "-bg" // Keep debug info
 #else
@@ -32,11 +42,7 @@ namespace lua_resource
 
 		const char* luajit[] =
 		{
-#if CROWN_PLATFORM_LINUX
-			"./luajit",
-#else
-			"luajit.exe",
-#endif // CROWN_PLATFORM_LINUX
+			LUAJIT_EXE,
 			LUAJIT_FLAGS,
 			res_abs_path.c_str(),
 			bc_abs_path.c_str(),