| 293 | void menuItem_Exit(); |
| 294 | |
| 295 | bool loadGpuImage(const char* localPath, UiImage* uiImage) |
| 296 | { |
| 297 | char imagePath[TFE_MAX_PATH]; |
| 298 | strcpy(imagePath, localPath); |
| 299 | if (!TFE_Paths::mapSystemPath(imagePath)) |
| 300 | { |
| 301 | memset(imagePath, 0, TFE_MAX_PATH); |
| 302 | TFE_Paths::appendPath(TFE_PathType::PATH_PROGRAM, localPath, imagePath, TFE_MAX_PATH); |
| 303 | FileUtil::fixupPath(imagePath); |
| 304 | } |
| 305 | SDL_Surface* image = TFE_Image::get(imagePath); |
| 306 | if (image) |
| 307 | { |
| 308 | TextureGpu* gpuImage = TFE_RenderBackend::createTexture(image->w, image->h, (u32*)image->pixels, MAG_FILTER_LINEAR); |
| 309 | uiImage->image = TFE_RenderBackend::getGpuPtr(gpuImage); |
| 310 | uiImage->width = image->w; |
| 311 | uiImage->height = image->h; |
| 312 | return true; |
| 313 | } |
| 314 | return false; |
| 315 | } |
| 316 | |
| 317 | void initConsole() |
| 318 | { |
no test coverage detected