MCPcopy Create free account
hub / github.com/Norbyte/bg3se / OnSDLEvent

Method OnSDLEvent

BG3Extender/Extender/ScriptExtender.cpp:619–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

617}
618
619void ScriptExtender::OnSDLEvent(SDL_Event* event)
620{
621 if (event->type == SDL_KEYDOWN
622 && event->key.keysym.scancode == SDL_SCANCODE_F12
623 && (unsigned)((SDLKeyModifier)event->key.keysym.mod & (SDLKeyModifier::LCtrl | SDLKeyModifier::RCtrl)) != 0) {
624
625 auto console = gCoreLibPlatformInterface.GlobalConsole;
626 if (!console->WasCreated()) {
627 console->Create();
628 }
629
630 }
631}
632
633}

Callers 1

SDLPollEventInternalMethod · 0.80

Calls 2

WasCreatedMethod · 0.80
CreateMethod · 0.45

Tested by

no test coverage detected