ソースを参照

Fix android build

Daniele Bartolini 10 年 前
コミット
65cfd8cfeb
2 ファイル変更2 行追加2 行削除
  1. 1 1
      src/device.cpp
  2. 1 1
      src/device_options.h

+ 1 - 1
src/device.cpp

@@ -76,7 +76,7 @@ void Device::init()
 	profiler_globals::init();
 
 #if CROWN_PLATFORM_ANDROID
-	_bundle_filesystem = CE_NEW(_allocator, ApkFilesystem)(_device_options.asset_manager());
+	_bundle_filesystem = CE_NEW(_allocator, ApkFilesystem)(const_cast<AAssetManager*>(_device_options.asset_manager()));
 #else
 	_bundle_filesystem = CE_NEW(_allocator, DiskFilesystem)(_device_options.bundle_dir());
 #endif // CROWN_PLATFORM_ANDROID

+ 1 - 1
src/device_options.h

@@ -35,7 +35,7 @@ struct DeviceOptions
 	uint16_t window_height() const { return _window_height; }
 
 #if CROWN_PLATFORM_ANDROID
-	AAssetManager* asset_manager();
+	const AAssetManager* asset_manager() const;
 #endif // CROWN_PLATFORM_ANDROID
 
 private: