Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accel sensor emulation #626

Open
wants to merge 13 commits into
base: android
Choose a base branch
from
Open

Accel sensor emulation #626

wants to merge 13 commits into from

Conversation

ikhoeyZX
Copy link

@ikhoeyZX ikhoeyZX commented Apr 27, 2024

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

@@ -645,7 +645,8 @@ struct LangState {
{ "reset_emu_path", "Reset Emulator Path" },
{ "reset_emu_path_description", "Reset Vita3K emulator path to the default.\nYou will need to move your old folder to the new location manually." },
{ "custom_config_settings", "Custom Config Settings" },
{ "clear_custom_config", "Clear Custom Config" }
{ "clear_custom_config", "Clear Custom Config" },
{ "sensor_settings", "Buildin Sensor settings" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change order, set it before, respect order like is visible inside setting dialog 👌

@@ -151,6 +151,8 @@ enum PerfomanceOverleyPosition {
code(bool, "spirv-shader", false, spirv_shader) \
code(bool, "fps-hack", false, fps_hack) \
code(uint64_t, "current-ime-lang", 4, current_ime_lang) \
code(bool, "acceleration-and-gyroscope", true, tiltsens) \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For name of option using same for both, with jyste replace - by _ in left, like other

@ikhoeyZX
Copy link
Author

done, like this?

@Zangetsu38
Copy link
Contributor

done, like this?

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

@ikhoeyZX
Copy link
Author

ikhoeyZX commented May 30, 2024

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
Copy link
Contributor

Croden1999 commented May 30, 2024

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
Copy link
Author

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
Copy link
Contributor

Croden1999 commented May 30, 2024

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
Copy link
Author

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
Copy link
Author

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
Copy link
Contributor

Croden1999 commented May 30, 2024

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
Copy link
Contributor

Croden1999 commented May 30, 2024

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
Copy link
Author

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

@Zangetsu38
Copy link
Contributor

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

@ikhoeyZX
Copy link
Author

ikhoeyZX commented May 30, 2024

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
Copy link
Author

ikhoeyZX commented May 30, 2024

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
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants