Ticket #452 (closed defect: fixed) — at Version 1
Opened 5 years ago
Last modified 5 years ago
SDL video resize event is off by one
| Reported by: | pulkomandy | Owned by: | scottmc |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | media-libs/libsdl | Version: | |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by scottmc) (diff)
Here's a patch done as part of GCI for fixing a little, but very annoying, SDL issue.
This is reported as sdl bug #1031 and may be uptreamed someday, but for the time being, I record it here.
The patch is done by Daniel Marth.
The problem was that in the file "./src/video/bwindow/SDL_sysevents.cc" the method "SDL_BWin::DirectConnected" called "SDL_PrivateResize" with wrong parameters (1 pixel too much for width and height).
Before:
void SDL_BWin::DirectConnected(direct_buffer_info *info) {
switch (info->buffer_state & B_DIRECT_MODE_MASK) {
case B_DIRECT_START:
case B_DIRECT_MODIFY:
{
int32 width = info->window_bounds.right -
info->window_bounds.left + 1;
int32 height = info->window_bounds.bottom -
info->window_bounds.top + 1;
SDL_PrivateResize(width, height);
break;
}
default:
break;
}
}
After:
void SDL_BWin::DirectConnected(direct_buffer_info *info) {
switch (info->buffer_state & B_DIRECT_MODE_MASK) {
case B_DIRECT_START:
case B_DIRECT_MODIFY:
{
int32 width = info->window_bounds.right -
info->window_bounds.left;
int32 height = info->window_bounds.bottom -
info->window_bounds.top;
SDL_PrivateResize(width, height);
break;
}
default:
break;
}
}
Change History
Changed 5 years ago by michaelvoliveira
- attachment libsdl-1.2-hg-resize.patch added
comment:1 Changed 5 years ago by scottmc
- Description modified (diff)
- Resolution set to fixed
- Status changed from new to closed
proper patch applied in r1229. Will send upstream now.
Note: See
TracTickets for help on using
tickets.

Patch created