--- trunk.orig/data/Makefile.am 2008-02-15 13:06:25.000000000 +0100 +++ enigma-1.10/data/Makefile.am 2008-02-21 21:34:41.000000000 +0100 @@ -1,4 +1,12 @@ -SUBDIRS = gfx fonts schemas levels sound soundsets gfx16 gfx32 gfx40 gfx48 +if MAEMO + GFX = gfx32 + MODELS = models-32.lua +else + GFX = gfx16 gfx32 gfx40 gfx48 + MODELS = models-16.lua models-32.lua models-40.lua models-48.lua +endif + +SUBDIRS = gfx fonts schemas levels sound soundsets $(GFX) pkgdata_DATA = \ enigma_conf.lua \ @@ -6,10 +14,7 @@ models-2d.lua \ models-oxyd.lua \ models-editor.lua \ - models-16.lua \ - models-32.lua \ - models-40.lua \ - models-48.lua \ + $(MODELS) \ init.lua \ startup.lua \ sound-defaults.lua \ --- trunk.orig/src/video.cc 2008-02-15 13:04:14.000000000 +0100 +++ enigma-1.10/src/video.cc 2008-02-22 12:57:58.000000000 +0100 @@ -181,7 +181,9 @@ // Hack to hide the cursor after switching between // window/fullscreen mode. +#ifndef TOUCHSCREEN SDL_ShowCursor (SDL_ENABLE); +#endif SDL_ShowCursor (SDL_DISABLE); SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY / 2, @@ -211,6 +213,8 @@ /* -------------------- MouseCursor -------------------- */ +#ifndef TOUCHSCREEN + MouseCursor::MouseCursor () : background(0), cursor(0) { @@ -320,12 +324,15 @@ SCREEN->update_rect (get_oldrect()); } } +#endif // !TOUCHSCREEN /* -------------------- Local Variables -------------------- */ namespace { Video_SDL *video_engine = 0; +#ifndef TOUCHSCREEN MouseCursor *cursor = 0; +#endif Surface *back_buffer = 0; /*! List of available video modes. */ @@ -346,6 +353,7 @@ Rect (150, 434, 475, 35), // text area true, true, // available window, fullscreen "-0-","-0-" // fallback modes window, fullscreen +#ifndef MAEMO }, { VM_640x512, 640, 512, // id, w, h @@ -516,6 +524,7 @@ Rect (75, 217, 237, 17), // text area true, true, // available window, fullscreen "-10-0-","-10-0-" // fallback modes window, fullscreen +#endif // !MAEMO } }; @@ -540,6 +549,7 @@ return false; } +#ifndef TOUCHSCREEN /*! This function is installed as an event filter by video::Init. It intercepts mouse motions, which are used to update the position of the mouse cursor (but passed on to the event queue) */ @@ -551,13 +561,13 @@ } return 1; } - +#endif } /* -------------------- Functions -------------------- */ - +#ifdef TOUCHSCREEN void video::SetMouseCursor(ecl::Surface *s, int hotx, int hoty) { cursor->set_image(s, hotx, hoty); @@ -582,6 +592,14 @@ return cursor->get_y(); } +#else // TOUCHSCREEN + +void video::SetMouseCursor(ecl::Surface *s, int hotx, int hoty) { } +void video::HideMouse() { } +void video::ShowMouse() { } + +#endif // TOUCHSCREEN + /* -------------------- Input grabbing -------------------- */ @@ -729,7 +747,11 @@ } } +#ifndef MAEMO bool isFullScreen = app.prefs->getBool("FullScreen"); +#else + bool isFullScreen = true; +#endif int vidmode = -1; if (app.prefs->getString("VideoModesFullscreen").empty()) { // initialize from 1.0 mode if never set before @@ -781,13 +803,14 @@ SDL_WM_SetIcon(icn->get_surface(), NULL); #endif +#ifndef TOUCHSCREEN cursor = new MouseCursor; int x, y; SDL_GetMouseState(&x, &y); cursor->move(x,y); SDL_SetEventFilter(event_filter); - +#endif UpdateGamma(); } @@ -796,21 +819,29 @@ { SDL_SetEventFilter(0); delete video_engine; +#ifndef TOUCHSCREEN delete cursor; +#endif delete back_buffer; video_engine = 0; +#ifndef TOUCHSCREEN cursor = 0; +#endif back_buffer = 0; } void video::ChangeVideoMode() { +#ifndef TOUCHSCREEN MouseCursor *oldcursor = cursor; cursor = 0; +#endif Shutdown(); Init(); +#ifndef TOUCHSCREEN delete cursor; cursor = oldcursor; +#endif } ecl::Screen * video::GetScreen() { --- trunk.orig/src/video.hh 2008-02-15 13:04:14.000000000 +0100 +++ enigma-1.10/src/video.hh 2008-02-22 13:01:41.000000000 +0100 @@ -32,6 +32,7 @@ enum VideoModes { VM_None = -1, VM_640x480 = 0, ///< 32 bit basic - 4:3 - VGA +#ifndef MAEMO VM_640x512 = 1, ///< 32 bit embedded - 5:4 - none VM_800x600 = 2, ///< 40 bit basic - 4:3 - SVGA VM_1024x768 = 3, ///< 48 bit embedded - 4:3 - XGA @@ -42,6 +43,7 @@ VM_1280x1024 = 8, ///< 64 bit embedded - 5:4 - SXGA VM_1680x1050 = 9, ///< 64 bit embedded - 16:10 - WSXGA+ VM_320x240 = 10, ///< 16 bit basic - 4:3 - CGA +#endif VM_COUNT }; --- trunk.orig/src/gui/OptionsMenu.cc 2008-02-15 13:04:12.000000000 +0100 +++ enigma-1.10/src/gui/OptionsMenu.cc 2008-02-22 13:05:37.000000000 +0100 @@ -124,7 +124,7 @@ }; - +#ifndef MAEMO /* -------------------- VideoModeButton -------------------- */ VideoModeButton::VideoModeButton() : ValueButton(0, 1) { @@ -160,7 +160,7 @@ const video::VMInfo * vi = video::GetInfo(video::GetVideoMode(value, isFullScreen)); return vi->name; } - +#endif // !MAEMO /* -------------------- SoundSetButton -------------------- */ @@ -219,13 +219,14 @@ return string(); } - +#ifndef MAEMO /* -------------------- FullscreenButton -------------------- */ FullscreenButton::FullscreenButton() : BoolOptionButton("FullScreen", N_("Yes"), N_("No")) { } +#endif /* -------------------- LanguageButton -------------------- */ @@ -341,18 +342,22 @@ BuildVList rightlabels (this, Rect(but_width+midspacing, 0, label_width, but_height), spacing); BuildVList right(this, Rect(but_width+midspacing+label_width, 0, but_width, but_height), spacing); leftlabels.add (new Label(N_("Language: "), HALIGN_RIGHT)); +#ifndef MAEMO leftlabels.add (new Label(N_("Fullscreen: "), HALIGN_RIGHT)); leftlabels.add (new Label(N_("Video mode: "), HALIGN_RIGHT)); +#endif leftlabels.add (new Label(N_("Gamma correction: "), HALIGN_RIGHT)); leftlabels.add (new Label(N_("Mouse speed: "), HALIGN_RIGHT)); language = new LanguageButton(this); left.add (language); +#ifndef MAEMO fullscreen = new FullscreenButton(); fullscreen->set_listener(this); left.add (fullscreen); videomode = new VideoModeButton(); left.add (videomode); +#endif left.add (new GammaButton); left.add (new MouseSpeedButton); @@ -433,6 +438,7 @@ bool OptionsMenu::on_event (const SDL_Event &e) { +#ifndef MAEMO bool handled=false; if (e.type == SDL_KEYUP) { if ((e.key.keysym.sym==SDLK_RETURN) && @@ -444,6 +450,9 @@ } } return handled; +#else + return false; +#endif } void OptionsMenu::on_action(Widget *w) @@ -453,6 +462,7 @@ else if (w == language) // language changed - retranslate and redraw everything invalidate_all(); +#ifndef MAEMO else if (w == fullscreen) { // switch the fullscreen button and option fullscreen->on_action(fullscreen); @@ -461,6 +471,7 @@ videomode->reinit(); invalidate_all(); } +#endif } void OptionsMenu::tick (double) --- trunk.orig/src/gui/MainMenu.cc 2008-02-15 13:04:12.000000000 +0100 +++ enigma-1.10/src/gui/MainMenu.cc 2008-02-22 13:07:10.000000000 +0100 @@ -290,7 +290,11 @@ void MainMenu::tick(double /* dtime */) { +#ifndef MAEMO bool isFullScreen = app.prefs->getBool("FullScreen"); +#else + bool isFullScreen = true; +#endif if (app.selectedVideoMode != video::GetVideoMode() || isFullScreen != video::IsFullScreen()) {