Daniele Bartolini 10 лет назад
Родитель
Сommit
74a2fef990
2 измененных файлов с 2 добавлено и 9 удалено
  1. 2 7
      src/device.cpp
  2. 0 2
      src/device.h

+ 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);