Skip to content
Open
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
5 changes: 0 additions & 5 deletions .github/workflows/manual_generate_apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ jobs:
# uses: nttld/setup-ndk@v1
# with:
# ndk-version: r21e

- name: Test androidGitVersion
run: |
echo "count=${{steps.valid-tags.outputs.count}}"
gradle --quiet androidGitVersion

- name: Assemble APK
run: ./gradlew assemble${{ github.event.inputs.buildVariant }} --stacktrace
Expand Down
2 changes: 2 additions & 0 deletions Core/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,8 @@ static const ConfigSetting graphicsSettings[] = {
ConfigSetting("TexScalingLevel", SETTING(g_Config, iTexScalingLevel), 1, CfgFlag::PER_GAME | CfgFlag::REPORT),
ConfigSetting("TexScalingType", SETTING(g_Config, iTexScalingType), 0, CfgFlag::PER_GAME | CfgFlag::REPORT),
ConfigSetting("TexDeposterize", SETTING(g_Config, bTexDeposterize), false, CfgFlag::PER_GAME | CfgFlag::REPORT),
ConfigSetting("UIButtonSharpen", SETTING(g_Config, bUIButtonSharpen), true, CfgFlag::PER_GAME | CfgFlag::REPORT),
ConfigSetting("UIButtonDownscaleFilter", SETTING(g_Config, iUIButtonDownscaleFilter), 2, CfgFlag::PER_GAME | CfgFlag::REPORT),
ConfigSetting("TexHardwareScaling", SETTING(g_Config, bTexHardwareScaling), false, CfgFlag::PER_GAME | CfgFlag::REPORT),
ConfigSetting("VerticalSync", SETTING(g_Config, bVSync), true, CfgFlag::PER_GAME),
ConfigSetting("LowLatencyPresent", SETTING(g_Config, bLowLatencyPresent), false, CfgFlag::PER_GAME),
Expand Down
4 changes: 4 additions & 0 deletions Core/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ struct Config : public ConfigBlock {
int iTexScalingLevel; // 0 = auto, 1 = off, 2 = 2x, ..., 5 = 5x
int iTexScalingType; // 0 = xBRZ, 1 = Hybrid
bool bTexDeposterize;
// Sharpen downscaled UI button PNG overrides when packing into atlas.
bool bUIButtonSharpen = true;
// 0 = Linear, 1 = Bicubic, 2 = Hybrid (area sampling + optional sharpen)
int iUIButtonDownscaleFilter = 2;
bool bTexHardwareScaling;
int iFpsLimit1;
int iFpsLimit2;
Expand Down
8 changes: 8 additions & 0 deletions GPU/Common/TextureReplacer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,14 @@ ignoreAddress = false # Reduces duplicates at the cost of making hash less re
# Use / for folders not \\, avoid special characters, and stick to lowercase.
# See wiki for more info.

[buttons]
# Optional mapping for UI button textures used by the on-screen controls.
# Keys can be either the button id (I_CROSS) or short name (cross).
# Values are paths relative to this TEXTURES/<GAMEID> folder.
# Example:
# cross = ui/buttons/cross.png
# I_CIRCLE = ui/buttons/circle.png

[hashranges]
# This is useful for images that very clearly have smaller dimensions, like 480x272 image. They'll need to be redumped, since the hash will change. See the documentation.
# Example: 08b31020,512,512 = 480,272
Expand Down
21 changes: 20 additions & 1 deletion UI/DeveloperToolsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include "UI/OnScreenDisplay.h"
#include "UI/IconCache.h"
#include "UI/MiscViews.h"
#include "UI/UIAtlas.h"

#if PPSSPP_PLATFORM(ANDROID)

Expand Down Expand Up @@ -91,7 +92,13 @@ void DeveloperToolsScreen::CreateTextureReplacementTab(UI::LinearLayout *list) {

list->Add(new ItemHeader(dev->T("Texture Replacement")));
list->Add(new CheckBox(&g_Config.bSaveNewTextures, dev->T("Save new textures")));
list->Add(new CheckBox(&g_Config.bReplaceTextures, dev->T("Replace textures")));
CheckBox *replaceTextures = list->Add(new CheckBox(&g_Config.bReplaceTextures, dev->T("Replace textures")));
replaceTextures->OnClick.Add([this](UI::EventParams &) {
if (UIContext *ctx = screenManager()->getUIContext()) {
ctx->InvalidateAtlas();
}
System_PostUIMessage(UIMessage::GPU_CONFIG_CHANGED);
});

Choice *createTextureIni = list->Add(new Choice(dev->T("Create/Open textures.ini file for current game")));
createTextureIni->OnClick.Handle(this, &DeveloperToolsScreen::OnOpenTexturesIniFile);
Expand Down Expand Up @@ -126,6 +133,8 @@ void DeveloperToolsScreen::CreateTextureReplacementTab(UI::LinearLayout *list) {
static const char *texLoadSpeeds[] = { "Slow (smooth)", "Medium", "Fast", "Instant (may stutter)" };
PopupMultiChoice *texLoadSpeed = list->Add(new PopupMultiChoice(&g_Config.iReplacementTextureLoadSpeed, dev->T("Replacement texture load speed"), texLoadSpeeds, 0, ARRAY_SIZE(texLoadSpeeds), I18NCat::DEVELOPER, screenManager()));
texLoadSpeed->SetChoiceIcon(3, ImageID("I_WARNING"));

list->Add(new Choice(dev->T("Save buttons texture")))->OnClick.Handle(this, &DeveloperToolsScreen::OnSaveButtonsTexture);
}

void DeveloperToolsScreen::CreateGeneralTab(UI::LinearLayout *list) {
Expand Down Expand Up @@ -237,6 +246,7 @@ void DeveloperToolsScreen::CreateGeneralTab(UI::LinearLayout *list) {
g_OSD.Show(OSDType::MESSAGE_INFO, ApplySafeSubstitutions(di->T("Copied to clipboard: %1"), "ppsspp.ini"), 0.0f, "copyToClip");
}
});

}

void DeveloperToolsScreen::CreateTestsTab(UI::LinearLayout *list) {
Expand Down Expand Up @@ -732,6 +742,15 @@ void DeveloperToolsScreen::OnRemoteDebugger(UI::EventParams &e) {
g_Config.bRemoteDebuggerOnStartup = allowDebugger_;
}

void DeveloperToolsScreen::OnSaveButtonsTexture(UI::EventParams &e) {
int dumped = DumpButtonsPNGsToSystem();
if (dumped > 0) {
g_OSD.Show(OSDType::MESSAGE_SUCCESS, "Buttons texture saved", StringFromFormat("Saved %d files to PSP/TEXTURES/<GAMEID>/new", dumped), 4.0f, "buttons_png_dump");
} else {
g_OSD.Show(OSDType::MESSAGE_ERROR, "Save buttons texture failed", "Could not save PNG files from buttons.svg", 4.0f, "buttons_png_dump");
}
}

void DeveloperToolsScreen::OnMIPSTracerEnabled(UI::EventParams &e) {
if (MIPSTracerEnabled_) {
u32 capacity = mipsTracer.in_storage_capacity;
Expand Down
1 change: 1 addition & 0 deletions UI/DeveloperToolsScreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class DeveloperToolsScreen : public UITabbedBaseDialogScreen {
void OnGPUDriverTest(UI::EventParams &e);
void OnMemstickTest(UI::EventParams &e);
void OnCopyStatesToRoot(UI::EventParams &e);
void OnSaveButtonsTexture(UI::EventParams &e);

void MemoryMapTest();

Expand Down
4 changes: 4 additions & 0 deletions UI/EmuScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ void EmuScreen::bootComplete() {
g_Discord.SetPresenceGame(sc->T("Untitled PSP game"));
}

if (UIContext *ctx = screenManager()->getUIContext()) {
ctx->InvalidateAtlas();
}

UpdateUIState(UISTATE_INGAME);
System_Notify(SystemNotification::BOOT_DONE);
System_Notify(SystemNotification::DISASSEMBLY);
Expand Down
8 changes: 8 additions & 0 deletions UI/GameSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,14 @@ void GameSettingsScreen::CreateGraphicsSettings(UI::ViewGroup *graphicsSettings)
CheckBox *smartFiltering = graphicsSettings->Add(new CheckBox(&g_Config.bSmart2DTexFiltering, gr->T("Smart 2D texture filtering")));
smartFiltering->SetDisabledPtr(&g_Config.bSoftwareRendering);

// UI button image sharpening for downscaled PNG overrides.
CheckBox *uiButtonSharpen = graphicsSettings->Add(new CheckBox(&g_Config.bUIButtonSharpen, gr->T("Sharpen downscaled UI button images")));
uiButtonSharpen->SetDisabledPtr(&g_Config.bSoftwareRendering);

static const char *uiDownscaleFilters[] = { "Linear", "Bicubic", "Hybrid (area+sharpen)" };
PopupMultiChoice *uiDownscaleFilterChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iUIButtonDownscaleFilter, gr->T("UI button downscale filter"), uiDownscaleFilters, 2, ARRAY_SIZE(uiDownscaleFilters), I18NCat::GRAPHICS, screenManager()));
uiDownscaleFilterChoice->SetDisabledPtr(&g_Config.bSoftwareRendering);

#if PPSSPP_PLATFORM(ANDROID) || PPSSPP_PLATFORM(IOS)
bool showCardboardSettings = deviceType != DEVICE_TYPE_VR;
#else
Expand Down
Loading