8000 260822 bugfix by axgdev · Pull Request #12 · axgdev/UniFrog · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ $(BUILD_IDENTITY_OBJECTS): $(BUILD_IDENTITY_STAMP)
quick-core-check core-smoke-check sdk dtb lib fastboot fastboot-only size component-sizes \
ci-deps ci-smoke-deps \
ci-toolchain ci-commit-smoke ci-commit-check ci-sd-zip print-config mmc-host-vendor-extract \
qemu-build qemu-smoke
qemu-build qemu-smoke qemu-launch-test

all: $(ASD) sdcard-package

Expand Down Expand Up @@ -837,6 +837,25 @@ qemu-smoke: qemu-build $(ASD)
cat "$(QEMU_TRACE_LOG)" >&2; exit 1; \
}
$(LOG_ECHO) " OK QEMU boot trace"

# End-to-end core launch test: builds a small SD image, auto-launches a ROM
# through the requested core, and checks the device log for a clean session.
# usage: make qemu-launch-test TEST_CORE=fbalpha2012 TEST_ROM=path/to.zip \
# [TEST_FRAMES=240]
TEST_CORE ?= fbalpha2012
TEST_ROM ?=
TEST_FRAMES ?= 240
qemu-launch-test: qemu-build $(ASD)
$(LOG_ECHO) " QEMU launch test core=$(TEST_CORE)"
$(Q)test -n "$(TEST_ROM)" || { \
echo "set TEST_ROM=<zip> for qemu-launch-test" >&2; exit 2; }
$(Q)test -s "$(CORE_PACKAGE)/$(TEST_CORE).bin" || { \
echo "missing core module; run: make -C cores $(call core_id_to_target,$(TEST_CORE))" >&2; exit 2; }
$(Q)QEMU_BIN="$(QEMU_BIN)" QEMU_DIR="$(QEMU_DIR)" \
QEMU_WORK="$(QEMU_WORK)" QEMU_VERSION="$(QEMU_VERSION)" \
sh tools/qemu_launch_test.sh \
CORE="$(TEST_CORE)" ROM="$(TEST_ROM)" \
FRAMES="$(TEST_FRAMES)"
setup: deps ci-toolchain
setup-min: deps-sdk deps-js2300 deps-lvgl deps-ffmpeg ffmpeg deps-support ci-toolchain
setup-cores: deps-sdk deps-js2300 deps-lvgl deps-ffmpeg ffmpeg deps-cores ci-toolchain
Expand Down
7 changes: 7 additions & 0 deletions THIRD_PARTY.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ of Noto Sans JP for the languages supported by the frontend and common Japanese
filenames. It is distributed under the SIL Open Font License 1.1; the complete
license is installed beside the font as `/unifrog_data/fonts/OFL.txt`.

The Polish Latin Extended-A glyphs (Aogonek through zdotaccent) that Noto Sans
JP lacks were transplanted as decomposed outlines from DejaVu Sans
(Bitstream Vera derivative, free license with an embedded-font exemption; see
`https://dejavu-fonts.github.io`). Their inclusion keeps the whole font
redistributable under the SIL Open Font License 1.1 alongside the existing
notice.

FrogUI packages GamePocket (SIL Open Font License 1.1) and Monogram (CC0) in
`/unifrog_data/frogui/fonts`; their complete notices are installed beside them.

Expand Down
7 changes: 7 additions & 0 deletions components/frontend/src/app/frontend_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,11 @@ static int frontend_app_initialized;
static const struct unifrog_frontend_launch_services
*frontend_app_launch_services;

static const char *frontend_app_translate(const char *key)
{
return tr(&frontend_app, key);
}

void unifrog_frontend_app_set_launch_services(
const struct unifrog_frontend_launch_services *services)
{
Expand All @@ -778,6 +783,7 @@ int unifrog_frontend_app_init(void)
if (frontend_app_initialized)
return 0;
memset(fe, 0, sizeof(*fe));
unifrog_frontend_lvgl_set_label_translator(frontend_app_translate);
fe->launch_services = frontend_app_launch_services ?
frontend_app_launch_services : unifrog_frontend_launch_services_default();
fe->theme = &frontend_theme;
Expand Down Expand Up @@ -883,6 +889,7 @@ int unifrog_frontend_app_init(void)
show_launch(fe);
fe->running = 1;
frontend_app_initialized = 1;
frontend_launch_test_target(fe);
return 0;
}

Expand Down
18 changes: 10 additions & 8 deletions components/frontend/src/app/frontend_draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ void frontend_draw(struct frontend_state *fe)
frontend_screen_style(fe, UNIFROG_FRONTEND_LVGL_LAUNCH));
if (unifrog_frontend_lvgl_draw_launcher(&fe->ui, fe->theme, fe->selected,
detail, fe->status[0] ? fe->status :
(fe->last_path[0] ? "A open SELECT+A resume" : NULL)) == 0)
(fe->last_path[0] ? tr(fe, "A open SELECT+A resume") : NULL)) == 0)
return;

unifrog_ui_begin(&fe->ui, fe->theme->background);
Expand Down Expand Up @@ -235,8 +235,9 @@ void frontend_draw(struct frontend_state *fe)
}
unifrog_ui_footer(&fe->ui, fe->theme,
fe->status[0] ? fe->status :
(fe->last_path[0] ? "A open SELECT+A resume" : "A open L/R page"),
"B back");
(fe->last_path[0] ? tr(fe, "A open SELECT+A resume") :
tr(fe, "A open L/R page")),
tr(fe, "B back"));
unifrog_ui_present(&fe->ui);
return;
}
Expand Down Expand Up @@ -288,7 +289,7 @@ void frontend_draw(struct frontend_state *fe)
fe->item_glyph_path, fe->item_glyph);
if (unifrog_frontend_lvgl_draw_menu(&fe->ui, fe->theme, screen, fe->title,
fe->selected, detail,
fe->status[0] ? fe->status : "A select B back", labels, values,
fe->status[0] ? fe->status : tr(fe, "A select B back"), labels, values,
fe->item_glyph, fe->item_count) == 0)
return;
}
Expand Down Expand Up @@ -329,14 +330,15 @@ void frontend_draw(struct frontend_state *fe)
(description && description[0])) {
if (unifrog_frontend_lvgl_draw_list_preview(&fe->ui, fe->theme,
fe->title, fe->selected, detail,
fe->status[0] ? fe->status : "A select X open with Y favorite",
fe->status[0] ? fe->status :
tr(fe, "A select X open with Y favorite"),
labels, values, fe->item_glyph, fe->item_count, box, preview,
description) == 0)
return;
}
if (unifrog_frontend_lvgl_draw_list(&fe->ui, fe->theme, fe->title,
fe->selected, detail,
fe->status[0] ? fe->status : "A select L/R page Y jump",
fe->status[0] ? fe->status : tr(fe, "A select L/R page Y jump"),
labels, values, fe->item_glyph, fe->item_count) == 0)
return;
}
Expand All @@ -362,7 +364,7 @@ void frontend_draw(struct frontend_state *fe)
if (fe->item_count == 0)
unifrog_ui_text(&fe->ui, 20, 72, "No entries", fe->theme->muted, 1);
unifrog_ui_footer(&fe->ui, fe->theme,
fe->status[0] ? fe->status : "A launch L/R page Y jump",
"B back");
fe->status[0] ? fe->status : tr(fe, "A launch L/R page Y jump"),
tr(fe, "B back"));
unifrog_ui_present(&fe->ui);
}
8 changes: 6 additions & 2 deletions components/frontend/src/app/frontend_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
#define FRONTEND_ROM_ROOT_LABEL_MAX 48u
#define FRONTEND_ROM_ROOT_MAX 8u
#define FRONTEND_ROM_SYSTEM_MAP_MAX 48u
#define FRONTEND_I18N_MAX 192u
#define FRONTEND_I18N_MAX 256u
#define FRONTEND_SCHEME_MAX 96u
#define FRONTEND_ASSOCIATION_MAX 112u
#define FRONTEND_ASSOCIATION_HANDLER_MAX 8u
Expand Down Expand Up @@ -209,6 +209,9 @@ struct frontend_state {
char current_dir[FRONTEND_MAX_PATH];
char last_path[FRONTEND_MAX_PATH];
char last_core[24];
char test_launch_path[FRONTEND_MAX_PATH];
char test_launch_core[48];
unsigned test_launch_frames;
struct frontend_item pending_open_item;
char pending_open_dir[FRONTEND_MAX_PATH];
int pending_open_valid;
Expand Down Expand Up @@ -264,7 +267,7 @@ struct frontend_state {
char artwork_cache_text[192];
char scheme_name[FRONTEND_SCHEME_MAX][32];
unsigned scheme_count;
char i18n_key[FRONTEND_I18N_MAX][40];
char i18n_key[FRONTEND_I18N_MAX][64];
char i18n_value[FRONTEND_I18N_MAX][128];
unsigned i18n_count;
char storage_profile[16];
Expand Down Expand Up @@ -469,6 +472,7 @@ void frontend_launch_script(struct frontend_state *fe,
void frontend_launch_with_handler(struct frontend_state *fe,
struct frontend_item *item, const char *handler);
void frontend_launch_last_game(struct frontend_state *fe);
void frontend_launch_test_target(struct frontend_state *fe);
void frontend_launch_audio_diagnostics(struct frontend_state *fe);
void frontend_show_open_with(struct frontend_state *fe,
const struct frontend_item *item);
Expand Down
23 changes: 23 additions & 0 deletions components/frontend/src/app/frontend_launch.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,29 @@ void frontend_launch_last_game(struct frontend_state *fe)
frontend_launch_game(fe, &last);
}

void frontend_launch_test_target(struct frontend_state *fe)
{
struct frontend_item item;
unsigned saved_max_frames;

if (!fe || !fe->test_launch_path[0])
return;
unifrog_log("frontend test launch path=%s core=%s frames=%u\n",
fe->test_launch_path, fe->test_launch_core,
fe->test_launch_frames);
memset(&item, 0, sizeof(item));
unifrog_text_copy(item.name, sizeof(item.name),
frontend_basename(fe->test_launch_path));
unifrog_text_copy(item.path, sizeof(item.path), fe->test_launch_path);
unifrog_text_copy(item.core, sizeof(item.core), fe->test_launch_core);
item.kind = FRONTEND_ITEM_GAME;
saved_max_frames = fe->run_options.max_frames;
if (fe->test_launch_frames)
fe->run_options.max_frames = fe->test_launch_frames;
frontend_launch_game(fe, &item);
fe->run_options.max_frames = saved_max_frames;
}

void frontend_launch_audio_diagnostics(struct frontend_state *fe)
{
char summary[96];
Expand Down
Loading
Loading
0