Skip to content

Commit

Permalink
Revert "Test android fix"
Browse files Browse the repository at this point in the history
This reverts commit 3e19627.
  • Loading branch information
Alphalaneous committed Nov 19, 2024
1 parent d54463b commit f4e253b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"win": "2.2074",
"android": "2.2074"
},
"version": "v0.9.10",
"version": "v0.9.9",
"id": "zalphalaneous.minecraft",
"name": "Minecraftify!",
"developer": "Alphalaneous",
Expand Down
10 changes: 3 additions & 7 deletions src/ui/nodes/MCButtonChild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,7 @@ void MCButtonChild::doClick(){
doAndroidBypass = true;
#endif

if (this->isHovering || doAndroidBypass) {

#ifndef GEODE_IS_ANDROID
if(this->isHovering || doAndroidBypass){

auto engine = FMODAudioEngine::sharedEngine();
auto system = engine->m_system;
Expand All @@ -154,16 +152,14 @@ void MCButtonChild::doClick(){
FMOD::Sound* sound;

std::string fullPath = CCFileUtils::sharedFileUtils()->fullPathForFilename("click.ogg"_spr, false);;
if (engine->m_sfxVolume > 0) {
if(engine->m_sfxVolume > 0) {
system->createSound(fullPath.c_str(), FMOD_DEFAULT, nullptr, &sound);
system->playSound(sound, nullptr, false, &channel);
channel->setVolume(engine->m_sfxVolume);
}

#endif

geode::Loader::get()->queueInMainThread([this]() { //delay it by a frame because for some reason it crashes the touch dispatcher otherwise ???
if (m_pListener && m_pfnSelector) {
if(m_pListener && m_pfnSelector){
(m_pListener->*m_pfnSelector)(this);
}
});
Expand Down

0 comments on commit f4e253b

Please sign in to comment.