Black Lines when changing resolution sizes

Hello!

so I’m having a bit of an issue, I recently made a settings menu for my game and well whenever I change the resolution to be smaller everything is fine and it works well but once I change it to a higher resolution from like 1920x1080 to like 2560x1440 then I get black lines on my screen and they won’t go away until I reboot the game, anybody know why this could be happening?

Here is my code:



and this is what I see when I make my resolution larger:

and this is what it is supposed to look like:

any ideas? also if I missed something or are looking for more info about it please let me know and I will try and get back to you as soon as I can!