MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Tools / handle_directfb_event

Method handle_directfb_event

cube/cube.cpp:3512–3530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3510#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
3511
3512void Demo::handle_directfb_event(const DFBInputEvent *event) {
3513 if (event->type != DIET_KEYPRESS) return;
3514 switch (event->key_symbol) {
3515 case DIKS_ESCAPE: // Escape
3516 quit = true;
3517 break;
3518 case DIKS_CURSOR_LEFT: // left arrow key
3519 spin_angle -= spin_increment;
3520 break;
3521 case DIKS_CURSOR_RIGHT: // right arrow key
3522 spin_angle += spin_increment;
3523 break;
3524 case DIKS_SPACE: // space bar
3525 pause = !pause;
3526 break;
3527 default:
3528 break;
3529 }
3530}
3531
3532template <>
3533void Demo::run<WsiPlatform::directfb>() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected