From 89602cfcab6480cbafc8d8154454c80d8ad11cd3 Mon Sep 17 00:00:00 2001 From: bicarus <202771338+bicarus-dev@users.noreply.github.com> Date: Fri, 29 May 2026 09:08:07 -0700 Subject: [PATCH] misc: clean up eamuse_get_game (#713) No need to allocate a new `std::string` every call... --- src/spice2x/misc/eamuse.cpp | 2 +- src/spice2x/misc/eamuse.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spice2x/misc/eamuse.cpp b/src/spice2x/misc/eamuse.cpp index d04c9fa..f40a222 100644 --- a/src/spice2x/misc/eamuse.cpp +++ b/src/spice2x/misc/eamuse.cpp @@ -631,7 +631,7 @@ void eamuse_update_keypad_bindings() { KEYPAD_BINDINGS = Config::getInstance().getKeypadBindings(EAMUSE_GAME_NAME); } -std::string eamuse_get_game() { +const std::string &eamuse_get_game() { return EAMUSE_GAME_NAME; } diff --git a/src/spice2x/misc/eamuse.h b/src/spice2x/misc/eamuse.h index 8c5e532..b2bd51d 100644 --- a/src/spice2x/misc/eamuse.h +++ b/src/spice2x/misc/eamuse.h @@ -78,7 +78,7 @@ bool eamuse_keypad_state_naive(); void eamuse_set_game(std::string game); -std::string eamuse_get_game(); +const std::string &eamuse_get_game(); int eamuse_get_game_keypads(); int eamuse_get_game_keypads_name();