Skip to content

Commit b1ae9a7

Browse files
authored
Merge pull request #3385 from Ghabry/libretro
Libretro fixes and one hotfix for YNOnline Users with loooong playtimes
2 parents c9f1f25 + 8027d22 commit b1ae9a7

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Diff for: src/platform/libretro/ui.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ RETRO_API void retro_get_system_info(struct retro_system_info* info) {
371371
info->library_name = GAME_TITLE;
372372
info->library_version = PLAYER_VERSION_FULL;
373373
info->need_fullpath = true;
374-
info->valid_extensions = "ldb|zip|easyrpg";
374+
info->valid_extensions = "ldb|zip|lzh|easyrpg";
375375
info->block_extract = true;
376376
}
377377

Diff for: src/player.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
#include "message_overlay.h"
8787
#include "audio_midi.h"
8888

89-
#ifdef __ANDROID__
89+
#if defined(__ANDROID__) && !defined(USE_LIBRETRO)
9090
#include "platform/android/android.h"
9191
#endif
9292

@@ -376,7 +376,7 @@ void Player::Update(bool update_scene) {
376376
Scene::instance->Update();
377377
}
378378

379-
#ifdef __ANDROID__
379+
#if defined(__ANDROID__) && !defined(USE_LIBRETRO)
380380
EpAndroid::invoke();
381381
#endif
382382
}

Diff for: src/scene_battle_rpg2k3.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ void Scene_Battle_Rpg2k3::UpdateAnimations() {
421421
}
422422
}
423423

424-
auto frame_counter = Main_Data::game_system->GetFrameCounter();
424+
auto frame_counter = static_cast<uint32_t>(Main_Data::game_system->GetFrameCounter());
425425

426426
bool ally_set = false;
427427
if (status_window->GetActive()

Diff for: src/tilemap_layer.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static constexpr uint8_t BlockD_Subtiles_IDS[50][2][2][2] = {
143143
// Set of neighboring autotiles -> autotile variant
144144
// Each neighbor is represented by a single bit (1 - same autotile, 0 - any other case)
145145
// The bits are ordered as follows (from most to least significant bit): NW N NE W E SW S SE
146-
static const std::unordered_map<uint8_t, int> AUTOTILE_D_VARIANTS_MAP = { //it also works with A
146+
static const std::unordered_map<uint8_t, int> AUTOTILE_D_VARIANTS_MAP = { //it also works with A
147147
{0b11111111, 0},
148148
{0b01111111, 1},
149149
{0b11011111, 2},
@@ -285,7 +285,7 @@ void TilemapLayer::Draw(Bitmap& dst, uint8_t z_order, int render_ox, int render_
285285
};
286286

287287
// FIXME: When Game_Map singleton is made an object we can remove this null check
288-
const auto frames = Main_Data::game_system ? Main_Data::game_system->GetFrameCounter() : 0;
288+
const auto frames = Main_Data::game_system ? static_cast<uint32_t>(Main_Data::game_system->GetFrameCounter()) : 0u;
289289
auto animation_step_c = (frames / 6) % 4;
290290
auto animation_step_ab = frames / animation_speed;
291291
if (animation_type) {

0 commit comments

Comments
 (0)