Hello LibSDL Discourse!
I’ve made a simple text editor with SDL and SDL_TTF as a learning exercise, but I’m having a problem with Window’s “Open With” functionality in their File Explorer. When I try to open a text file using this, my text editor launches with a blank white screen for a few seconds and then crashes and closes.
In my research, I’ve found that all the “Open With” feature does is open the application in a hidden terminal and pass the file path of the file you selected. If I simulate this by launching my program with a command prompt and passing the file I want as a command-line argument and parsing it in main(), then it works great.
Does anyone know what’s going on here? My guess is it’s something within SDL that I’m missing, but I’m at a loss. I’m targetting x64 and using SDL 2.0.18 if it helps.
Thank you for your time!