From 37d481ea0803d4760d58dcf784dd16362d3c5fbd Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Wed, 5 Jul 2023 17:06:58 +0100 Subject: [PATCH] Android flickering fix * Removed permission request for external storage (not functional since API level 30) * Fixed flickering on android devices (caused by the above) --- game/scripts/gui/main_menu.rpy | 2 +- game/scripts/mods.rpy | 2 +- game/scripts/options.rpy | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/game/scripts/gui/main_menu.rpy b/game/scripts/gui/main_menu.rpy index c080aa97..48459ef6 100644 --- a/game/scripts/gui/main_menu.rpy +++ b/game/scripts/gui/main_menu.rpy @@ -278,7 +278,7 @@ screen navigation(title=None): textbutton _("Preferences") action ShowMenu("preferences") sensitive is_sensitive if main_menu: - textbutton _("Mods") sensitive (bool(mods_list) and is_sensitive) action If(AskPermission("android.permission.WRITE_EXTERNAL_STORAGE"), ShowMenu("mods"), Function(renpy.notify, "Please grant storage permissions to enable modding functionality.")) + textbutton _("Mods") sensitive (bool(mods_list) and is_sensitive) action ShowMenu("mods") textbutton _("Credits") action Jump("credits") sensitive is_sensitive if not renpy.mobile: textbutton _("Quit") action Quit(confirm=not main_menu) sensitive is_sensitive diff --git a/game/scripts/mods.rpy b/game/scripts/mods.rpy index 124aa58e..ddf821f7 100644 --- a/game/scripts/mods.rpy +++ b/game/scripts/mods.rpy @@ -89,4 +89,4 @@ init python: if not renpy.android: return True - return renpy.android and (renpy.check_permission(self.name) or renpy.request_permission(self.name)) + return (renpy.check_permission(self.name) or renpy.request_permission(self.name)) diff --git a/game/scripts/options.rpy b/game/scripts/options.rpy index fed05539..069b4779 100644 --- a/game/scripts/options.rpy +++ b/game/scripts/options.rpy @@ -147,6 +147,7 @@ define config.profile = False init python: build.name = "WTS" + build.directory_name = f"WTS-{config.version}" build.include_update = True build.include_old_themes = False build.exclude_empty_directories = True @@ -185,4 +186,4 @@ init python: build.classify("game/saves/**", None) build.classify("game/mods/**", None) - build.android_permissions = ["android.permission.WRITE_EXTERNAL_STORAGE"] + # build.android_permissions = ["android.permission.WRITE_EXTERNAL_STORAGE"] # Not functional since API level 30+