final fixes for UIQ3
authornotaz <notasas@gmail.com>
Sun, 24 Aug 2008 13:26:57 +0000 (13:26 +0000)
committernotaz <notasas@gmail.com>
Sun, 24 Aug 2008 13:26:57 +0000 (13:26 +0000)
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@573 be3aeb3a-fb24-0410-a615-afba39da0efa

Pico/Draw.c
platform/common/config.c
platform/uiq3/engine/audio_mediaserver.cpp
platform/uiq3/engine/vid.cpp

index 215e9ec..15d0992 100644 (file)
@@ -1430,7 +1430,7 @@ static void PicoLine(void)
     FinalizeLine(sh);\r
 \r
   if (PicoScanEnd != NULL)\r
-    PicoScanEnd(DrawScanline);\r
+    skip_next_line = PicoScanEnd(DrawScanline);\r
 }\r
 \r
 void PicoDrawSync(int to, int blank_last_line)\r
index a621893..c530c95 100644 (file)
@@ -729,7 +729,8 @@ static void keys_parse(const char *var, const char *val, int binds[32],
                return;
        }
 
-       if (binds == currentConfig.KeyBinds && !(keys_encountered & (1<<t))) { // hack
+       // unbind old, but only when key is first encountered
+       if (t < 32 && binds == currentConfig.KeyBinds && !(keys_encountered & (1<<t))) {
                binds[t] = 0;
                keys_encountered |= 1<<t;
        }
index c9788d3..e9f77d0 100644 (file)
@@ -95,8 +95,10 @@ void CGameAudioMS::ConstructL()
        iBufferSize *= bufferedFrames;\r
        for (TInt i=0 ; i<KSoundBuffers ; i++)\r
        {\r
-               iSoundBuffers[i] = HBufC8::NewL(iBufferSize);\r
-               iSoundBuffers[i]->Des().FillZ  (iBufferSize);\r
+               // it seems .SetLength(max) throws USER:23 panic,\r
+               // so make them a bit larger\r
+               iSoundBuffers[i] = HBufC8::NewL(iBufferSize+4);\r
+               iSoundBuffers[i]->Des().FillZ  (iBufferSize+4);\r
        }\r
 \r
        iCurrentBuffer = 0;\r
index ea3cf9b..d21e854 100644 (file)
@@ -321,7 +321,7 @@ static void vidBlitCenter_180(int full)
 static void vidBlitFit_0(int full)\r
 {\r
        if(Pico.video.reg[12]&1)\r
-                vidConvCpy_center2_40c_0(screenbuff, PicoDraw2FB+328*8, localPal, 168);\r
+            vidConvCpy_center2_40c_0(screenbuff, PicoDraw2FB+328*8, localPal, 168);\r
        else vidConvCpy_center2_32c_0(screenbuff, PicoDraw2FB+328*8, localPal, 168);\r
        if(full) vidClear((unsigned long *)screenbuff + 168*256, 320-168);\r
 }\r
@@ -389,6 +389,7 @@ int vidInit(void *vidmem, int reinit)
        // select suitable blitters\r
        vidBlit = vidBlit_270;\r
        PicoScanBegin = EmuScanBegin8;\r
+       PicoScanEnd = NULL;\r
        drawTextFps = drawTextFps0;\r
        drawTextNotice = drawTextNotice0;\r
 \r
@@ -411,6 +412,7 @@ int vidInit(void *vidmem, int reinit)
                        vidBlit = vidBlitFit_0;\r
                        drawTextFps = drawTextFpsFit0;\r
                        drawTextNotice = drawTextNoticeFit0;\r
+                       PicoScanBegin = NULL;\r
                        PicoScanEnd = EmuScanEndFit0;\r
                }\r
        } else if (currentConfig.rotation == TPicoConfig::PRot90) {\r
@@ -432,6 +434,7 @@ int vidInit(void *vidmem, int reinit)
                        vidBlit = vidBlitFit_180;\r
                        drawTextFps = drawTextFpsFit0;\r
                        drawTextNotice = drawTextNoticeFit0;\r
+                       PicoScanBegin = NULL;\r
                        PicoScanEnd = EmuScanEndFit0;\r
                }\r
        }\r