| 106 | } |
| 107 | |
| 108 | pu::sdl2::Texture TryFindLoadImage(const std::string &path_no_ext) { |
| 109 | for(const auto &fmt: ImageFormatList) { |
| 110 | const auto path = TryGetActiveThemeResource(path_no_ext + "." + fmt); |
| 111 | const auto img = pu::ui::render::LoadImageFromFile(path); |
| 112 | if(img != nullptr) { |
| 113 | return img; |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | return nullptr; |
| 118 | } |
| 119 | |
| 120 | void InitializeResources() { |
| 121 | if(!g_CommonResourcesLoaded) { |
no test coverage detected