diff --git a/CMakeLists.txt b/CMakeLists.txt index 7be7fdb..02064fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,5 +105,5 @@ if (NOT "${HOST_CMAKE_C_COMPILER}" STREQUAL "") message(STATUS "Host C compiler: ${HOST_CMAKE_CXX_COMPILER}") endif() -install(FILES snap/gui/icon.png DESTINATION share/anbox/ui) +install(FILES data/ui/loading-screen.png DESTINATION share/anbox/ui) diff --git a/data/ui/loading-screen.png b/data/ui/loading-screen.png new file mode 100644 index 0000000..2678361 Binary files /dev/null and b/data/ui/loading-screen.png differ diff --git a/snapcraft.yaml b/snapcraft.yaml index dfd0660..7c4d150 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -124,4 +124,5 @@ parts: make test prime: - usr/bin/anbox + - usr/share/anbox - usr/lib/*-linux-*/ diff --git a/src/anbox/cmds/launch.cpp b/src/anbox/cmds/launch.cpp index f309491..16f71dd 100644 --- a/src/anbox/cmds/launch.cpp +++ b/src/anbox/cmds/launch.cpp @@ -88,8 +88,8 @@ anbox::cmds::Launch::Launch() const auto snap_path = utils::get_env_value("SNAP"); if (!snap_path.empty()) { - const auto resource_path = utils::string_format("%s/share/anbox", snap_path); - SystemConfiguration::instance().set_resource_path(resource_path) + const auto resource_path = utils::string_format("%s/usr/share/anbox", snap_path); + SystemConfiguration::instance().set_resource_path(resource_path); } std::shared_ptr ss; diff --git a/src/anbox/ui/splash_screen.cpp b/src/anbox/ui/splash_screen.cpp index c8c7f86..c4ca6cf 100644 --- a/src/anbox/ui/splash_screen.cpp +++ b/src/anbox/ui/splash_screen.cpp @@ -48,18 +48,16 @@ SplashScreen::SplashScreen() { if (!renderer) BOOST_THROW_EXCEPTION(std::runtime_error("Could not create renderer")); - const auto icon_path = utils::string_format("%s/ui/icon.png", SystemConfiguration::instance().resource_dir()); + const auto icon_path = utils::string_format("%s/ui/loading-screen.png", SystemConfiguration::instance().resource_dir()); auto img = IMG_LoadTexture(renderer, icon_path.c_str()); if (!img) { const auto msg = utils::string_format("Failed to create texture from %s", icon_path); BOOST_THROW_EXCEPTION(std::runtime_error(msg)); } - const auto tex_width = 128, tex_height = 128; - SDL_Rect r{(width - tex_width) / 2, (height - tex_height) / 2, 128, 128}; - - SDL_SetRenderDrawColor(renderer, 0xee, 0xee, 0xee, 0xff); SDL_RenderClear(renderer); + + SDL_Rect r{0, 0, 1024, 768}; SDL_RenderCopy(renderer, img, nullptr, &r); SDL_RenderPresent(renderer);