| Summary: | Window size is returning a wrong value in max resolution | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Lísias de Castro <saisilcastro> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | NEW --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.12 | ||
| Hardware: | x86 | ||
| OS: | Windows 10 | ||
When I used my function to get a resolution I saved it into file. Before to get into the event loop the resolution was correct, but when the loop came into SDL_WINDOWEVENT_RESIZED and I updated my screen width and height through event.window.data. The problem is the data2 came with the wrong value. here is my event code piece: ... case SDL_WINDOWEVENT_RESIZED: { machine->width = SDL_C(machine->plugin)->event.window.data1; machine->height = SDL_C(machine->plugin)->event.window.data2; SDL_IMAGE_SET * image = (SDL_IMAGE_SET*) map->of->image; if (image && image->memory) { B32 width, height; SDL_QueryTexture(image->memory, NULL, NULL, &width, &height); map->width = (BP32) width; map->height = (BP32) height; } } break; ...