| 402 | #endif |
| 403 | |
| 404 | uintptr_t SDLHelper::getWindowHandle(SDL_Window *window) { |
| 405 | SDL_SysWMinfo wmInfo; |
| 406 | SDL_VERSION(&wmInfo.version); |
| 407 | SDL_GetWindowWMInfo(window, &wmInfo); |
| 408 | |
| 409 | #if CC_PLATFORM == CC_PLATFORM_WINDOWS |
| 410 | return reinterpret_cast<uintptr_t>(wmInfo.info.win.window); |
| 411 | #elif (CC_PLATFORM == CC_PLATFORM_LINUX) |
| 412 | return reinterpret_cast<uintptr_t>(wmInfo.info.x11.window); |
| 413 | #elif (CC_PLATFORM == CC_PLATFORM_MACOS) |
| 414 | return reinterpret_cast<uintptr_t>(wmInfo.info.cocoa.window); |
| 415 | #endif |
| 416 | CC_ABORT(); |
| 417 | return 0; |
| 418 | } |
| 419 | |
| 420 | Vec2 SDLHelper::getWindowPosition(SDL_Window *window) { |
| 421 | int x = 0; |
no outgoing calls
no test coverage detected