Merge branch 'main' into Gestions_hitbox
This commit is contained in:
commit
947905c39a
41
Game.cpp
41
Game.cpp
|
@ -68,6 +68,47 @@ bool Game::Init()
|
||||||
}
|
}
|
||||||
cerr << "Window created successfully.\n";
|
cerr << "Window created successfully.\n";
|
||||||
|
|
||||||
|
SDL_EventType disableEvents[] = {
|
||||||
|
// Événements liés aux manettes (joysticks)
|
||||||
|
SDL_JOYAXISMOTION,
|
||||||
|
SDL_JOYBALLMOTION,
|
||||||
|
SDL_JOYHATMOTION,
|
||||||
|
SDL_JOYBUTTONDOWN,
|
||||||
|
SDL_JOYBUTTONUP,
|
||||||
|
SDL_JOYDEVICEADDED,
|
||||||
|
SDL_JOYDEVICEREMOVED,
|
||||||
|
|
||||||
|
// Événements liés aux contrôleurs (game controllers)
|
||||||
|
SDL_CONTROLLERAXISMOTION,
|
||||||
|
SDL_CONTROLLERBUTTONDOWN,
|
||||||
|
SDL_CONTROLLERBUTTONUP,
|
||||||
|
SDL_CONTROLLERDEVICEADDED,
|
||||||
|
SDL_CONTROLLERDEVICEREMOVED,
|
||||||
|
SDL_CONTROLLERDEVICEREMAPPED,
|
||||||
|
|
||||||
|
// Événements de glisser-déposer (drag & drop)
|
||||||
|
SDL_DROPFILE,
|
||||||
|
SDL_DROPTEXT,
|
||||||
|
SDL_DROPBEGIN,
|
||||||
|
SDL_DROPCOMPLETE,
|
||||||
|
|
||||||
|
// Événements liés aux appareils tactiles
|
||||||
|
SDL_FINGERMOTION,
|
||||||
|
SDL_FINGERDOWN,
|
||||||
|
SDL_FINGERUP,
|
||||||
|
SDL_MULTIGESTURE,
|
||||||
|
SDL_DOLLARGESTURE,
|
||||||
|
SDL_DOLLARRECORD,
|
||||||
|
|
||||||
|
// Événements liés aux capteurs
|
||||||
|
SDL_SENSORUPDATE,
|
||||||
|
|
||||||
|
// Événements utilisateurs (custom)
|
||||||
|
SDL_USEREVENT
|
||||||
|
};
|
||||||
|
|
||||||
|
for(const SDL_EventType &disableEvent : disableEvents) SDL_EventState(disableEvent, SDL_DISABLE);
|
||||||
|
|
||||||
renderer = SDL_CreateRenderer(m_window, -1, 0);
|
renderer = SDL_CreateRenderer(m_window, -1, 0);
|
||||||
if(renderer == NULL)
|
if(renderer == NULL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue