HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • ← Previous Ticket
  • Next Ticket →

Ticket #452 (closed defect: fixed)

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;
    }
}

Attachments

libsdl-1.2-hg-resize.patch​ (1.2 KB) - added by michaelvoliveira 5 years ago.
Patch created

Download all attachments as: .zip

Change History

Changed 5 years ago by michaelvoliveira

  • attachment libsdl-1.2-hg-resize.patch​ added

Patch created

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.

Download in other formats:

  • Comma-delimited Text
  • Tab-delimited Text
  • RSS Feed

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/