sdl2-compat: Removed implicit memcpy() in SDL_GetClosestDisplayModeForDisplay()

From 1dcd1cf8850ce6ca359303fb35204c09c2e6e688 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sun, 6 Aug 2023 16:52:25 -0700
Subject: [PATCH] Removed implicit memcpy() in
 SDL_GetClosestDisplayModeForDisplay()

---
 src/sdl2_compat.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index 18cf5f9..5d78b5a 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -4630,15 +4630,10 @@ SDL_GetClosestDisplayModeForDisplay(SDL_DisplayID displayID,
     Uint32 target_format;
     float target_refresh_rate;
     int i;
-    SDL_DisplayMode requested_mode;
     const SDL_DisplayMode *current, *match;
     const SDL_DisplayMode **list;
     int count = 0;
 
-    /* Make sure all the fields are filled out in the requested mode */
-    requested_mode = *mode;
-    mode = &requested_mode;
-
     /* Default to the desktop format */
     if (mode->format) {
         target_format = mode->format;