Fix VRAM leak on window resize#413
Conversation
|
Sorry for the delay. I'm a bit hesitant to create a unique_ptr here in this one case as it's not used anywhere else in the code base and like for the C++ version bump, I'd like to keep things so that it could be potentially compiled on a potato if needed. |
|
No problem
Well,
Your choice, I have no info on the portability of different C++ versions to either object or support that :) |
|
I might be being too strict regarding the usage of C++ standard library stuff - I've been wary of sending this project down a "let's port System Shock to modern C++!" rabbit hole of refactoring for refactoring's sake but for something like this it does make sense. I'll merge this in if you can resolve the conflicts. |
Also newer compilers give a warning (that gets promoted to a compile-time error) on
interp.c:216. Fixed it with an explicit conversionAdmittedly, using a
std::unique_ptris a bit overkill here becauseCreateFrameBufferis only called once in the entire code base, but I've decided to stay future-proof just in case.Also, maybe project's
CMAKE_CXX_STANDARDcould be bumped to at least 14-17? I see no reason to keep it as low as 11, but ofc there's also an argument of "if it ain't broke don't fix it"...