foxygit / fake-08-xbox360 Log in
commit 3c721bfa8c4092e0247d5e393bb24a74bb0e6b5f
Author:     Jon Bell <j.to.the.bell@gmail.com>
AuthorDate: Tue Jan 13 19:55:22 2026 -0700
Commit:     Jon Bell <j.to.the.bell@gmail.com>
CommitDate: Tue Jan 13 19:55:22 2026 -0700

    Prevent adding .png to default cart names
---
 source/cart.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/source/cart.cpp b/source/cart.cpp
index 0fc8676..db7be29 100644
--- a/source/cart.cpp
+++ b/source/cart.cpp
@@ -469,7 +469,8 @@ Cart::Cart(std::string filename, std::string cartDirectory){

     std::string firstFourChars = get_first_four_chars(FullCartPath);

-    if ((fileExtension == "" || fileExtension == ".p8") && firstFourChars.length() == 0) {
+    if ((fileExtension == "" || fileExtension == ".p8") && firstFourChars.length() == 0
+        && !isDefaultCart && !isSettingsCart) {
         //fallback for cart loading by key - support .p8 and .p8.png
         filename = filename + ".png";
         // Rebuild full path with cart directory (same logic as initial path build)