Daniele Bartolini 10 месяцев назад
Родитель
Сommit
fcac142eb0

+ 3 - 3
src/device/device.cpp

@@ -509,7 +509,7 @@ bool Device::frame()
 	return false;
 }
 
-int Device::run()
+int Device::main_loop()
 {
 	s64 run_t0 = time::now();
 
@@ -1001,12 +1001,12 @@ void Device::screenshot(const char *path)
 
 Device *_device = NULL;
 
-int run(const DeviceOptions &opts)
+int main_runtime(const DeviceOptions &opts)
 {
 	CE_ASSERT(_device == NULL, "Crown already initialized");
 	console_server_globals::init();
 	_device = CE_NEW(default_allocator(), Device)(opts, *console_server());
-	int ec = _device->run();
+	int ec = _device->main_loop();
 	CE_DELETE(default_allocator(), _device);
 	_device = NULL;
 	console_server_globals::shutdown();

+ 2 - 3
src/device/device.h

@@ -99,7 +99,7 @@ struct Device
 	bool frame();
 
 	/// Runs the application until quit() is called.
-	int run();
+	int main_loop();
 
 	/// Returns the number of command line parameters.
 	int argc() const;
@@ -145,8 +145,7 @@ struct Device
 	void screenshot(const char *path);
 };
 
-/// Runs the engine.
-int run(const DeviceOptions &opts);
+int main_runtime(const DeviceOptions &opts);
 
 /// Returns the device.
 Device *device();

+ 1 - 1
src/device/main_android.cpp

@@ -87,7 +87,7 @@ struct AndroidDevice
 
 			if (!_main_thread.is_running()) {
 				_main_thread.start([](void *user_data) {
-						return crown::run(*((DeviceOptions *)user_data));
+						return crown::main_runtime(*((DeviceOptions *)user_data));
 					}
 					, _opts
 					);

+ 1 - 1
src/device/main_html5.cpp

@@ -442,7 +442,7 @@ struct EmscriptenDevice
 		emscripten_get_element_css_size("#" CROWN_HTML5_CANVAS_NAME, &width, &height);
 		_queue.push_resolution_event(width, height);
 
-		return crown::run(*opts);
+		return crown::main_runtime(*opts);
 	}
 };
 

+ 1 - 1
src/device/main_linux.cpp

@@ -501,7 +501,7 @@ struct LinuxDevice
 		// Start main thread
 		Thread main_thread;
 		main_thread.start([](void *user_data) {
-				int ec = crown::run(*((DeviceOptions *)user_data));
+				int ec = crown::main_runtime(*((DeviceOptions *)user_data));
 				s_exit = true;
 				// Write something just to unlock the listening select().
 				write(exit_pipe[1], &s_exit, sizeof(s_exit));

+ 1 - 1
src/device/main_windows.cpp

@@ -416,7 +416,7 @@ struct WindowsDevice
 		Thread main_thread;
 		main_thread.start([](void *user_data) {
 				WindowsDevice *win = (WindowsDevice *)user_data;
-				int ec = crown::run(*win->_options);
+				int ec = crown::main_runtime(*win->_options);
 				s_exit = true;
 				PostMessageA(win->_hwnd, WM_USER + 1, 0, 0);
 				return ec;