Ticket #9060: wince-diff.patch

File wince-diff.patch, 5.1 KB (added by CeRiAl, 15 years ago)

SVN Diff

  • backends/platform/wince/module.mk

     
     1MODULE := backends/platform/wince
     2
     3MODULE_OBJS := \
     4        CEActionsPocket.o CEDevice.o CEScaler.o \
     5        CEActionsSmartphone.o CELauncherDialog.o wince-sdl.o \
     6        CEgui/GUIElement.o CEgui/Panel.o CEgui/SDL_ImageResource.o \
     7        CEgui/ItemAction.o CEgui/PanelItem.o CEgui/Toolbar.o \
     8        CEgui/ItemSwitch.o CEgui/PanelKeyboard.o CEgui/ToolbarHandler.o \
     9        CEkeys/EventsBuffer.o \
     10        ../../../gui/Actions.o ../../../gui/Key.o ../../../gui/KeysDialog.o \
     11        ../sdl/sdl.o ../sdl/graphics.o ../sdl/events.o ../sdl/hardwarekeys.o \
     12        missing/missing.o \
     13        PocketSCUMM.o \
     14        ARMscaler.o \
     15        smartLandScale.o
     16
     17MODULE_DIRS += \
     18        backends/platform/wince/
     19
     20# We don't use the rules.mk here on purpose
     21OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS)
  • backends/platform/wince/CEgui/SDL_ImageResource.cpp

     
    6060                _surface = SDL_LoadBMP_RW(surfaceData, 1);
    6161
    6262                return _surface;
    63         };
     63        }
    6464
    6565        SDL_Surface* SDL_ImageResource::get() {
    6666                return _surface;
  • backends/platform/wince/missing/missing.cpp

     
    135135#endif
    136136EXT_C void GetCurrentDirectory(int len, char *buf) {
    137137        getcwd(buf,len);
    138 };
     138}
    139139
     140
    140141/*
     142Windows CE has no perror
     143*/
     144//      #define perror(_t) MessageBox(NULL, _T("_t"), _T("Error/Warning"), MB_OK)
     145
     146/* An strerror-like function that takes a Win32 error instead
     147   of an errno error in ERROR.  */
     148
     149static char * strwinerror (DWORD error) {
     150        static char buf[1024];
     151        wchar_t msgbuf[1024];
     152        DWORD chars = FormatMessageW (
     153                                FORMAT_MESSAGE_FROM_SYSTEM,
     154                NULL,
     155                error,
     156                0, /* Default language */
     157                (WCHAR*)&msgbuf,
     158                0,
     159                NULL);
     160        if (chars != 0) {
     161                /* If there is an \r\n appended, zap it.  */
     162                if (chars >= 2
     163                        && msgbuf[chars - 2] == '\r'
     164                        && msgbuf[chars - 1] == '\n')
     165                                msgbuf[chars - 2] = 0;
     166                wcstombs (buf, msgbuf, chars + 1);
     167        } else
     168                sprintf (buf, "unknown win32 error (%ld)", error);
     169        return buf;
     170}
     171
     172extern void perror (const char *);
     173void perror (const char *s) {
     174  if (s && *s)
     175    fprintf (stderr, "%s: %s\n", s, strwinerror (GetLastError ()));
     176  else
     177    fprintf (stderr, "%s\n", strwinerror (GetLastError ()));
     178}
     179
     180
     181/*
    141182Windows CE fopen has non-standard behavior -- not
    142183fully qualified paths refer to root folder rather
    143184than current folder (concept not implemented in CE).
  • backends/platform/wince/wince.mk

     
     1# ScummVM Makefile for Windows CE port
     2# Uses the cegcc toolchain. For build info check out the wiki: http://wiki.scummvm.org
     3# $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/backends/platform/wince/Makefile $
     4# $Id: Makefile 42645 2009-07-21 19:39:24Z robinwatts $
     5
     6ifdef USE_ZLIB
     7DEFINES += -DUSE_ZLIB
     8LIBS += -lzlib
     9endif
     10
     11ifdef USE_MAD
     12DEFINES += -DUSE_MAD
     13LIBS += -lmad
     14endif
     15
     16ifdef USE_MPEG2
     17DEFINES += -DUSE_MPEG2
     18LIBS += -lmpeg2
     19endif
     20
     21ifdef USE_TREMOR
     22DEFINES += -DUSE_TREMOR -DUSE_VORBIS
     23LIBS += -ltremorce
     24endif
     25
     26ifdef USE_TREMOLO
     27DEFINES += -DUSE_TREMOR -DUSE_VORBIS -DUSE_TREMOLO
     28INCLUDES += -I$(srcdir)/backends/platform/wince/libs/include/tremolo
     29LIBS += -llibTremolo
     30endif
     31
     32ifdef USE_FLAC
     33DEFINES += -DUSE_FLAC
     34LIBS += -lFLAC
     35endif
     36
     37ifdef USE_ARM_SMUSH_ASM
     38DEFINES += -DUSE_ARM_SMUSH_ASM
     39endif
     40
     41ifdef USE_ARM_GFX_ASM
     42DEFINES += -DUSE_ARM_GFX_ASM
     43endif
     44
     45ifdef USE_ARM_COSTUME_ASM
     46DEFINES += -DUSE_ARM_COSTUME_ASM
     47endif
     48
     49ifdef USE_ARM_SCALER_ASM
     50DEFINES += -DUSE_ARM_SCALER_ASM
     51endif
     52
     53ifdef USE_ARM_SMUSH_ASM
     54DEFINES += -DUSE_ARM_SMUSH_ASM
     55endif
     56
     57ifdef USE_ARM_GFX_ASM
     58DEFINES += -DUSE_ARM_GFX_ASM
     59endif
     60
     61ifdef USE_ARM_COSTUME_ASM
     62DEFINES += -DUSE_ARM_COSTUME_ASM
     63endif
     64
     65ifdef USE_ARM_SCALER_ASM
     66DEFINES += -DUSE_ARM_SCALER_ASM
     67endif
     68
     69#all: dist
     70#       echo $(EXECUTABLE)
     71       
     72#dist: ARMscaler.o PocketSCUMM.o $(EXECUTABLE)
     73
     74#all-clean: clean
     75#       $(RM) ARMscaler.o PocketSCUMM.o stub.o
  • ports.mk

     
    141141                                        ScummVM-snapshot.dmg
    142142        rm -rf ScummVM-snapshot
    143143
     144
    144145#
     146# Windows CE specific
     147#
     148
     149backends/platform/wince/PocketSCUMM.o: $(srcdir)/backends/platform/wince/PocketSCUMM.rc
     150        $(WINDRES) -I$(srcdir)/backends/platform/wince $(srcdir)/backends/platform/wince/PocketSCUMM.rc backends/platform/wince/PocketSCUMM.o
     151
     152
     153#
    145154# Windows specific
    146155#
    147156