mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-02 02:33:43 +01:00
1 parent
0d2acb6d73
commit
c65bfdffc6
2 files changed
+4
-1
No files matched your search
+1
-1
@@ -818,7 +818,7 @@ bool NativeInitGraphics(GraphicsContext *graphicsContext) {
|
||||
size_t atlas_data_size = 0;
|
||||
if (!g_ui_atlas.IsMetadataLoaded()) {
|
||||
const uint8_t *atlas_data = VFSReadFile("ui_atlas.meta", &atlas_data_size);
|
||||
bool load_success = g_ui_atlas.Load(atlas_data, atlas_data_size);
|
||||
bool load_success = atlas_data != nullptr && g_ui_atlas.Load(atlas_data, atlas_data_size);
|
||||
_assert_msg_(G3D, load_success, "Failed to load ui_atlas.meta");
|
||||
delete[] atlas_data;
|
||||
}
|
||||
|
||||
@@ -250,6 +250,9 @@ inline void rot(float *v, float angle, float xc, float yc) {
|
||||
|
||||
void DrawBuffer::DrawImageRotated(ImageID atlas_image, float x, float y, float scale, float angle, Color color, bool mirror_h) {
|
||||
const AtlasImage *image = atlas->getImage(atlas_image);
|
||||
if (!image)
|
||||
return;
|
||||
|
||||
float w = (float)image->w * scale;
|
||||
float h = (float)image->h * scale;
|
||||
float x1 = x - w / 2;
|
||||
|
||||
Reference in new issue
Block a user