summaryrefslogtreecommitdiff
path: root/src/spec.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2021-05-23 20:45:19 +0000
committerIan C <ianc@noddybox.co.uk>2021-05-23 20:45:19 +0000
commit15d2a8724930bfb3d87f20b286391d4133d42d98 (patch)
tree339a39d4c78c6ee78946bdf952a2bcd4a4ca84f0 /src/spec.c
parent6c1f2fec30886e845db47c14cd284103d9f55189 (diff)
Updates for SDL2HEADmaster
Diffstat (limited to 'src/spec.c')
-rw-r--r--src/spec.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/spec.c b/src/spec.c
index 3a9b295..7066292 100644
--- a/src/spec.c
+++ b/src/spec.c
@@ -23,8 +23,6 @@
Provides the emulation for the Spectrum
*/
-static const char ident[]="$Id$";
-
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -36,8 +34,6 @@ static const char ident[]="$Id$";
#include "exit.h"
#include "util.h"
-static const char ident_h[]=ESPEC_SPECH;
-
#ifndef TRUE
#define TRUE 1
#endif
@@ -138,7 +134,7 @@ static Z80Byte matrix[8];
typedef struct
{
- SDLKey key;
+ SDL_Keycode key;
int m1,b1,m2,b2;
} MatrixMap;
@@ -259,8 +255,6 @@ static void DrawScanlineAt(int y, int sline)
if (aline>=0 && aline<SCRL)
{
- GFXLock();
-
scr=line[aline];
for(f=0;f<TXT_W;f++)
@@ -285,12 +279,10 @@ static void DrawScanlineAt(int y, int sline)
for(r=0,b=*scr++;r<8;r++)
if (b&(1<<(7-r)))
- GFXFastPlot(f*8+r+OFF_X,y,coltable[ink].col);
+ GFXPlot(f*8+r+OFF_X,y,coltable[ink].col);
else
- GFXFastPlot(f*8+r+OFF_X,y,coltable[paper].col);
+ GFXPlot(f*8+r+OFF_X,y,coltable[paper].col);
}
-
- GFXUnlock();
}
}
@@ -505,6 +497,11 @@ void SPECKeyEvent(SDL_Event *e)
{
const MatrixMap *m;
+ if (e->key.repeat)
+ {
+ return;
+ }
+
m=keymap;
while(m->key!=SDLK_UNKNOWN)