| 742 | // *********************************************************************** |
| 743 | |
| 744 | Vec2i GetMousePosition() { |
| 745 | // TODO: This becomes wrong at the edge of the screen, must apply screen warning to it as well |
| 746 | Vec2i mousePosition; |
| 747 | SDL_GetMouseState(&mousePosition.x, &mousePosition.y); |
| 748 | f32 xAdjusted = (f32)mousePosition.x / pInputState->windowResolution.x * pInputState->targetResolution.x; |
| 749 | f32 yAdjusted = pInputState->targetResolution.y - ((f32)mousePosition.y / pInputState->windowResolution.y * pInputState->targetResolution.y); |
| 750 | return Vec2i((int)xAdjusted, (int)yAdjusted); |
| 751 | } |
| 752 | |
| 753 | // *********************************************************************** |
| 754 |
no outgoing calls
no test coverage detected