Skip to content

Commit

Permalink
Do not initialize SDL video system in bear::input.
Browse files Browse the repository at this point in the history
  • Loading branch information
j-jorge committed Feb 8, 2017
1 parent 99b646f commit 8b08a7a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions bear-engine/core/src/input/code/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
*/
void bear::input::system::initialize()
{
if ( !SDL_WasInit(SDL_INIT_VIDEO) )
if ( SDL_InitSubSystem(SDL_INIT_VIDEO) != 0 )
throw claw::exception( SDL_GetError() );
CLAW_PRECOND( SDL_WasInit(SDL_INIT_VIDEO) );

if ( SDL_InitSubSystem(SDL_INIT_JOYSTICK) != 0 )
throw claw::exception( SDL_GetError() );
Expand Down Expand Up @@ -63,7 +61,6 @@ void bear::input::system::release()
system::get_instance().clear();

SDL_QuitSubSystem(SDL_INIT_JOYSTICK);
SDL_QuitSubSystem(SDL_INIT_VIDEO);
} // system::release()

/*----------------------------------------------------------------------------*/
Expand Down

0 comments on commit 8b08a7a

Please sign in to comment.