diff options
author | Ian C <ianc@noddybox.co.uk> | 2021-05-23 20:45:19 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2021-05-23 20:45:19 +0000 |
commit | 15d2a8724930bfb3d87f20b286391d4133d42d98 (patch) | |
tree | 339a39d4c78c6ee78946bdf952a2bcd4a4ca84f0 /src/spec.c | |
parent | 6c1f2fec30886e845db47c14cd284103d9f55189 (diff) |
Diffstat (limited to 'src/spec.c')
-rw-r--r-- | src/spec.c | 19 |
1 files changed, 8 insertions, 11 deletions
@@ -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) |