Ticket #5907: zoomKeysPatch.patch

File zoomKeysPatch.patch, 5.0 KB (added by SF/nerdknight, 12 years ago)

This patch solves the problem, it's made out of version 1.4.0, it includes also the keyevents patch. I took the patch from the version from maemo repositories.

  • backends/events/sdl/sdl-events.cpp

    diff -ru scummvm-1.4.0_orig//backends/events/sdl/sdl-events.cpp scummvm-1.4.0//backends/events/sdl/sdl-events.cpp
    old new  
    402402
    403403
    404404bool SdlEventSource::handleKeyDown(SDL_Event &ev, Common::Event &event) {
    405 
    406405        SDLModToOSystemKeyFlags(SDL_GetModState(), event);
    407 
    408406        // Handle scroll lock as a key modifier
    409407        if (ev.key.keysym.sym == SDLK_SCROLLOCK)
    410408                _scrollLock = !_scrollLock;
  • backends/graphics/surfacesdl/surfacesdl-graphics.cpp

    diff -ru scummvm-1.4.0_orig//backends/graphics/surfacesdl/surfacesdl-graphics.cpp scummvm-1.4.0//backends/graphics/surfacesdl/surfacesdl-graphics.cpp
    old new  
    715715        width = bestMode->w;
    716716        height = bestMode->h;
    717717}
     718#ifdef MAEMO
     719#include "SDL_syswm.h"
     720
     721static void maemo5_WM_init(int fullscreen){
     722//static int fsdone=0;
     723//static int wmdone=0;
     724SDL_SysWMinfo info;
     725SDL_VERSION(&info.version);
     726
     727if ( SDL_GetWMInfo(&info) ) {
     728
     729        Display *dpy = info.info.x11.display;
     730
     731        Window win;
     732
     733        unsigned long val = 1;
     734        Atom atom_zoom = XInternAtom(dpy, "_HILDON_ZOOM_KEY_ATOM", 0);
     735        info.info.x11.lock_func();
     736        win = info.info.x11.fswindow;
     737
     738        if (win)
     739                XChangeProperty (dpy,win,atom_zoom,XA_INTEGER,32,PropModeReplace,(unsigned char *) &val,1); // grab zoom keys
     740        win = info.info.x11.wmwindow;
     741
     742        if (win)
     743                XChangeProperty (dpy,win,atom_zoom,XA_INTEGER,32,PropModeReplace,(unsigned char *) &val,1); // grab zoom keys
     744        info.info.x11.unlock_func();
     745}
     746}
     747#endif
     748
    718749
    719750bool SurfaceSdlGraphicsManager::loadGFXMode() {
    720751        _forceFull = true;
     
    756787                error("allocating _screen failed");
    757788#endif
    758789
     790#ifdef MAEMO
     791        maemo5_WM_init(_videoMode.fullscreen);
     792#endif
     793
    759794        // SDL 1.2 palettes default to all black,
    760795        // SDL 1.3 palettes default to all white,
    761796        // Thus set our own default palette to all black.
  • backends/graphics/surfacesdl/surfacesdl-graphics.h

    diff -ru scummvm-1.4.0_orig//backends/graphics/surfacesdl/surfacesdl-graphics.h scummvm-1.4.0//backends/graphics/surfacesdl/surfacesdl-graphics.h
    old new  
    9797        virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const;
    9898#endif
    9999        virtual void initSize(uint w, uint h, const Graphics::PixelFormat *format = NULL);
     100
    100101        virtual int getScreenChangeID() const { return _screenChangeCount; }
    101102
    102103        virtual void beginGFXTransaction();
  • backends/platform/maemo/maemo.cpp

    diff -ru scummvm-1.4.0_orig//backends/platform/maemo/maemo.cpp scummvm-1.4.0//backends/platform/maemo/maemo.cpp
    old new  
    108108        return *model;
    109109}
    110110
     111void OSystem_SDL_Maemo::setupIcon() {
     112 // no Maemo version needs setupIcon
     113
     114 // also N900 is hit by SDL_WM_SetIcon bug (window cannot receive input)
     115
     116 // http://bugzilla.libsdl.org/show_bug.cgi?id=586
     117
     118}
     119
    111120} //namespace Maemo
    112121
    113122#endif
  • backends/platform/maemo/maemo.h

    diff -ru scummvm-1.4.0_orig//backends/platform/maemo/maemo.h scummvm-1.4.0//backends/platform/maemo/maemo.h
    old new  
    3838        virtual void quit();
    3939        virtual void fatalError();
    4040        virtual void setWindowCaption(const char *caption);
     41        virtual void setupIcon();
    4142
    4243        Model getModel() { return _model; }
    4344
  • backends/platform/sdl/sdl.cpp

    diff -ru scummvm-1.4.0_orig//backends/platform/sdl/sdl.cpp scummvm-1.4.0//backends/platform/sdl/sdl.cpp
    old new  
    242242#endif
    243243
    244244void OSystem_SDL::initSDL() {
     245
    245246        // Check if SDL has not been initialized
    246247        if (!_initedSDL) {
    247248                uint32 sdlFlags = 0;
  • scummvm-1.4.

    diff -ru scummvm-1.4.0_orig//configure scummvm-1.4.0//configure
    old new  
    22672267                        INCLUDES="$INCLUDES -I/usr/X11R6/include"
    22682268                        LIBS="$LIBS -lpthread"
    22692269                        LIBS="$LIBS -L/usr/lib"
     2270                        LIBS="$LIBS -lX11"
    22702271                       
    22712272                        _backend="maemo"
    22722273                        _vkeybd=yes
  • scummvm-1.4.

    diff -ru scummvm-1.4.0_orig//Makefile scummvm-1.4.0//Makefile
    old new  
    88DEFINES     := -DHAVE_CONFIG_H
    99LDFLAGS     :=
    1010INCLUDES    := -I. -I$(srcdir) -I$(srcdir)/engines
    11 LIBS        :=
     11LIBS        := -lX11
    1212OBJS        :=
    1313DEPDIR      := .deps