Daniele Bartolini 10 年 前
コミット
ac18684737
2 ファイル変更2 行追加2 行削除
  1. 0 2
      src/crown.cpp
  2. 2 0
      src/device.cpp

+ 0 - 2
src/crown.cpp

@@ -63,7 +63,6 @@ bool init(const DeviceOptions& opts, Filesystem& fs)
 	physics_globals::init();
 	bgfx::init();
 	device_globals::init(opts, fs);
-	device()->init();
 	return true;
 }
 
@@ -81,7 +80,6 @@ void update()
 
 void shutdown()
 {
-	device()->shutdown();
 	device_globals::shutdown();
 	bgfx::shutdown();
 	physics_globals::shutdown();

+ 2 - 0
src/device.cpp

@@ -277,10 +277,12 @@ namespace device_globals
 	{
 		CE_ASSERT(_device == NULL, "Crown already initialized");
 		_device = new (_buffer) Device(opts, fs);
+		_device->init();
 	}
 
 	void shutdown()
 	{
+		_device->shutdown();
 		_device->~Device();
 		_device = NULL;
 	}