RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Allow <forceUppercase/> as shortcut for <forceUppercase>true</forceUppercase> ?

    Scheduled Pinned Locked Moved Ideas and Development
    themesemulationstatio
    4 Posts 3 Posters 266 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LolonoisL
      Lolonois
      last edited by

      Would it be okay to have "tagging" boolean XML-elements in themes ?

      Currently it is needed to have a 1, t[rue], y[es] to enable a boolean switch in the themes:

      e.g. <forceUppercase>1</forceUppercase> which is a redundant syntax in context of an boolean switch.

      My suggestion woudl be to allow also <forceUppercase/> to be evaluated to true.
      If such an boolean element is not present it will evalated to its default nevertheless.

      This line can be added with an first == '\x00' || to allow tagging boolean XML elements.

      Will this change create regressions upstream?

      IanDaemonI mituM LolonoisL 3 Replies Last reply Reply Quote 0
      • IanDaemonI
        IanDaemon @Lolonois
        last edited by IanDaemon

        @lolonois I'm not disagreeing. I'm just trying to understand your intent. Is your argument that: three states (1, T, Y) returning affirmative is redundant, therefore we should have four (1, T, Y, existence)? I'm not trying to be argumentative; I'm just trying to understand.

        • 5 Favorite Arcade Games in MAME
        • Cocktail Cabinet Games
        • Check out the MAME RoW
        1 Reply Last reply Reply Quote 0
        • mituM
          mitu Global Moderator @Lolonois
          last edited by

          @lolonois said in Allow <forceUppercase/> as shortcut for <forceUppercase>true</forceUppercase> ?:

          e.g. <forceUppercase>1</forceUppercase> which is a redundant syntax in context of an boolean switch.

          It's not redundant if you view it as a question/option value rather than an affirmation (forceUppercase?: 1/0, true/false). IMHO should be left as is.

          1 Reply Last reply Reply Quote 0
          • LolonoisL
            Lolonois @Lolonois
            last edited by

            Thanks both.

            This XML element is not mandatory, so it can be left out and it will evaluated to false if a theme checks this value. If it is there it has to be explicitly set 1 (or semantically equivalent) to be effective. This is why I perceive it as redundant and picked the term.

            Never mind, let's keep the implementation as-is.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.