Vita3K / Vita3K-Android

Public releases and CI for the Vita3K Android app
GNU General Public License v2.0
1.19k stars 44 forks source link

Accel sensor emulation #626

Open ikhoeyZX opened 5 months ago

ikhoeyZX commented 5 months ago

Allow emulating acceleration position (x position only) to fix spesific rotation instead using sensor, it used for reduce power in case game it self not using sensor

maybe in some arcade game need fix to portait mode so you can play it in bed without get random rotating

*also i did fix asian font in android

screenshot: Screenshot_20240427_123256_Vita3K Screenshot_20240427_123300_Vita3K

ikhoeyZX commented 4 months ago

done, like this?

Zangetsu38 commented 4 months ago

done, like this?

i thinks yes, i am just not sur font font change 🤔

ikhoeyZX commented 4 months ago

done, like this?

i thinks yes, i am just not sur font font change 🤔

for font (SourceHanSansSC-Bold-Min.ttf) it's not exist in android (i did compare 5 phones with different OS), so i just use alternative buildin android unicode font and it's fix invisible fonts when "enable asia font" thicked. also i did test it using chinese, japanese and korean text and no issue

Croden1999 commented 4 months ago

done, like this?

i thinks yes, i am just not sur font font change 🤔

for font (SourceHanSansSC-Bold-Min.ttf) it's not exist in android (i did compare 5 phones with different OS), so i just use alternative buildin android unicode font and it's fix invisible fonts when "enable asia font" thicked. also i did test it using chinese, japanese and korean text and no issue

the font is exist, included licenses. default_font isn't important, is need for gui text, all most time used vita font

ikhoeyZX commented 4 months ago

done, like this?

i thinks yes, i am just not sur font font change 🤔

for font (SourceHanSansSC-Bold-Min.ttf) it's not exist in android (i did compare 5 phones with different OS), so i just use alternative buildin android unicode font and it's fix invisible fonts when "enable asia font" thicked. also i did test it using chinese, japanese and korean text and no issue

the font is exist, included licenses.

hmm eventhough it's exist why vita3k always report in log that font not exist? maybe i need check font calls

Croden1999 commented 4 months ago

hmm eventhough it's exist why vita3k always report in log that font not exist? maybe i need check font calls

U r not push the font in data/fonts, i think should revert, add Korean ttf/ttc font and license

ikhoeyZX commented 4 months ago

hmm eventhough it's exist why vita3k always report in log that font not exist? maybe i need check font calls

U r not push the font in data/fonts, i think should revert, add Korean ttf/ttc font and license

ok i'm gonna revert it

ikhoeyZX commented 4 months ago

Screenshot_20240530_142846_FX

actually it's exist in .apk but tried call it always got "not found" same like user lang i did test copy to vita3k (ua.xml) maybe i need android studio to "add" it

Croden1999 commented 4 months ago

actually it's exist in .apk but tried call it always got "not found" same like user lang i did test copy to vita3k (ua.xml) maybe i need android studio to "add" it

i know, look this log, here is not exist fonts in pref_path/sa0, only need install font firmware, no have change font Screenshot_2024-05-30-14-37-16-927_bin mt plus

Croden1999 commented 4 months ago

i push the cjk font in #3020, is fixed ZH-S/ZH-T/Korean text issue, but the font size and bulid are too big, and then i give up push the cjk font, only added the ZH-S font and license

if wanna fixed display Korean GUI text when you used default font, you need push font file in https://github.com/Vita3K/Vita3K-Android/blob/android/data/fonts/, and update code in gui.cpp

ikhoeyZX commented 4 months ago

why vita3k not use built-in system fonts like android and windows system fonts? because license or what?

Zangetsu38 commented 4 months ago

i juste no really why crzate this pr for android build 🤔 It is totaly for for main master too

ikhoeyZX commented 4 months ago

or should i add

ifdef ANDROID

or do like this?

const auto fontpath = fs::path(default_font_path / "SourceHanSansSC-Bold-Min.ttf");
                if(!fs::exists(fontpath))
                    fontpath = fs::path(default_font_path / "NotoSerifCJK-Regular.ttc");

const std::vector<uint8_t> font_source = fs_utils::read_asset_raw(fontpath);

it should be fine for both build

ikhoeyZX commented 4 months ago

i juste no really why crzate this pr for android build 🤔 It is totaly for for main master too

reason i make this PR because most vita games not using this sensors, so it just waste some power in android while in pc this sensor didn't exist (except connecting controller)

nishinji commented 4 months ago

i juste no really why crzate this pr for android build 🤔 It is totaly for for main master too

I agree with you, where is the need to worry about power consumption of a few mW?