clipboard: SDL_GetPrimarySelectionText() now follows the SDL_GetStringRule.

Reference Issue #10229.
This commit is contained in:
Ryan C. Gordon
2024-07-15 14:07:33 -04:00
parent 158fc459f1
commit d40b89dff6
5 changed files with 12 additions and 16 deletions

View File

@@ -2264,13 +2264,12 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
case SDLK_V:
if (withAlt) {
/* Alt-V paste awesome text from the primary selection! */
char *text = SDL_GetPrimarySelectionText();
const char *text = SDL_GetPrimarySelectionText();
if (*text) {
SDL_Log("Primary selection: %s\n", text);
} else {
SDL_Log("Primary selection is empty\n");
}
SDL_free(text);
} else if (withControl) {
if (withShift) {