SDL2 not throwing window close event
For personal use, I’m coding an additional layer on SDL2, which includes an event manager. It correctly detects every type of event, except SDL_WINDOWEVENT_CLOSE
. After trying to debug my code, I realized that SDL2 actually never fires that event on my device… So there’s no problem when I have only 1 window (because SDL_QUIT
is thrown instead), but when I have several windows I just can’t detect when a window closing is requested, and I have to ctrl+C my program from the shell to have SDL_QUIT
fired manually.
SDL2 not throwing window close event
For personal use, I’m coding an additional layer on SDL2, which includes an event manager. It correctly detects every type of event, except SDL_WINDOWEVENT_CLOSE
. After trying to debug my code, I realized that SDL2 actually never fires that event on my device… So there’s no problem when I have only 1 window (because SDL_QUIT
is thrown instead), but when I have several windows I just can’t detect when a window closing is requested, and I have to ctrl+C my program from the shell to have SDL_QUIT
fired manually.
Why isn’t c++ letting me include a header file?
I am trying to use SDL2 with C++, but have spent months trying to get it working.
Trying to create a simple shooting mechanic
I am trying to create a very simple feature where the player shoots
bullets vertically.
Problems with SDL2 controller rumble
I’m making a game using C++ and SDL2, and for testing purposes I wanted my controller to rumble when detected by the program. However, said rumbling does not happen. I tried calling SDL_GameControllerRumble
in another part of my program to test it, and in that case it works until I unplug and plug back in my controller a few times.
error allocating an object of an abstract class type
**menu button class:** #ifndef __FORGE_MENU_BUTTON_HPP__ #define __FORGE_MENU_BUTTON_HPP__ #include “ForgeConstruct.hpp” #include “ForgeConstructFactory.hpp” class ForgeMenuButton : public ForgeSDLConstruct { public: ForgeMenuButton() : ForgeSDLConstruct() {} virtual void load(const ForgeConstructParams*); . . more code in here but removed conciseness . }; **class ForgeMenuButtonCreator : public ForgeBaseCreator{ ForgeConstruct* createForgeConstruct() const { return new ForgeMenuButton();** } }; **base class** class ForgeBaseCreator{ […]
SDL2 Window won’t render colors/displays transparent window
When I run this program (C) :