Fix builds for Android

This commit is contained in:
twinaphex 2020-10-12 21:52:02 +02:00
parent 6badcba144
commit 594d1c0959
3 changed files with 40 additions and 4 deletions

View File

@ -9,6 +9,8 @@ include:
file: '/linux-x64.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/windows-x64-mingw.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/android-jni.yml'
stages:
- build-prepare
@ -30,3 +32,24 @@ libretro-build-windows-x64:
- .libretro-windows-x64-mingw-make-default
variables:
MAKEFILE: Makefile
# Android
android-armeabi-v7a:
extends:
- .core-defs
- .libretro-android-jni-armeabi-v7a
android-arm64-v8a:
extends:
- .core-defs
- .libretro-android-jni-arm64-v8a
android-x86_64:
extends:
- .core-defs
- .libretro-android-jni-x86_64
android-x86:
extends:
- .core-defs
- .libretro-android-jni-x86

View File

@ -12,7 +12,7 @@
#else
#define foreach(iter, object) \
for(unsigned foreach_counter = 0, foreach_limit = container_size(object), foreach_once = 0, foreach_broken = 0; foreach_counter < foreach_limit && foreach_broken == 0; foreach_counter++, foreach_once = 0) \
for(typeof(object[0u]) &iter = object[foreach_counter]; foreach_once == 0 && (foreach_broken = 1); foreach_once++, foreach_broken = 0)
for(__typeof__(object[0u]) &iter = object[foreach_counter]; foreach_once == 0 && (foreach_broken = 1); foreach_once++, foreach_broken = 0)
#endif
#endif

View File

@ -311,16 +311,29 @@ void retro_get_system_info(struct retro_system_info *info) {
}
void retro_get_system_av_info(struct retro_system_av_info *info) {
struct retro_game_geometry geom;
struct retro_system_timing timing = { 0.0, 32040.5 };
timing.fps = retro_get_region() == RETRO_REGION_NTSC ? 21477272.0 / 357366.0 : 21281370.0 / 425568.0;
if (!interface.penviron(RETRO_ENVIRONMENT_GET_OVERSCAN, &interface.overscan))
interface.overscan = false;
struct retro_game_geometry geom = { 256, interface.overscan ? 239 : 224, 512, interface.overscan ? 478 : 448 };
geom.base_width = 256;
if (interface.overscan)
{
geom.base_height = 239;
geom.max_height = 478;
}
else
{
geom.base_height = 224;
geom.max_height = 448;
}
geom.max_width = 512;
geom.aspect_ratio = 0.0f;
info->timing = timing;
info->geometry = geom;
info->timing = timing;
info->geometry = geom;
}
static bool snes_load_cartridge_normal(