usim

Check-in [e4e225b7e8]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:sdl1.c: Remove unused stuff.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | ams/sdl1
Files: files | file ages | folders
SHA3-256: e4e225b7e84e35639a747a93ce6086b8ec44581f1e24994323890b43e6a6ac00
User & Date: ams 2024-06-01 05:02:44
Context
2024-06-01
05:18
sdl1.c: Fill in some of the keyboard mappings. check-in: a7a010e029 user: ams tags: ams/sdl1
05:02
sdl1.c: Remove unused stuff. check-in: e4e225b7e8 user: ams tags: ams/sdl1
2024-05-31
08:33
Implement first stap at working keyboard input. check-in: db7f9eef58 user: ams tags: ams/sdl1
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to sdl1.c.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "kbd.h"
#include "mouse.h"
#include "utrace.h"
#include "idle.h"

SDL_Surface *screen;

struct DisplayState {
	unsigned char *data;
	int linesize;
	int depth;
	int width;
	int height;
};
static struct DisplayState display_state;
static struct DisplayState *ds = &display_state;

/*
 * Translation map for the host keyboard to a corresponding Lisp
 * Machine character or modifier.
 */
int sdl1_kbd_map[65535];
int sdl1_modifier_map[8];








<
<
<
<
<
<
<
<
<
<







9
10
11
12
13
14
15










16
17
18
19
20
21
22
#include "kbd.h"
#include "mouse.h"
#include "utrace.h"
#include "idle.h"

SDL_Surface *screen;











/*
 * Translation map for the host keyboard to a corresponding Lisp
 * Machine character or modifier.
 */
int sdl1_kbd_map[65535];
int sdl1_modifier_map[8];

272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
	 * We still want Ctrl-C to work - undo the SDL redirections.
	 */
	signal(SIGINT, SIG_DFL);
	signal(SIGQUIT, SIG_DFL);
	/*
	 * Resize SDL screen to fit the TV console.
	 */
	{
		screen = SDL_SetVideoMode(tv_width, tv_height, 8, SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL);
		if (!screen) {
			fprintf(stderr, "Could not open SDL display\n");
			exit(1);
		}
		ds->data = screen->pixels;
		ds->linesize = screen->pitch;
		ds->depth = screen->format->BitsPerPixel;
		ds->width = tv_width;
		ds->height = tv_height;
	}
	SDL_ShowCursor(0);	/* Invisible cursor. */
	atexit(sdl1_cleanup);
}







<
|
|
|
|
<
<
<
<
<
<




262
263
264
265
266
267
268

269
270
271
272






273
274
275
276
	 * We still want Ctrl-C to work - undo the SDL redirections.
	 */
	signal(SIGINT, SIG_DFL);
	signal(SIGQUIT, SIG_DFL);
	/*
	 * Resize SDL screen to fit the TV console.
	 */

	screen = SDL_SetVideoMode(tv_width, tv_height, 8, SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL);
	if (!screen) {
		fprintf(stderr, "Could not open SDL display\n");
		exit(1);






	}
	SDL_ShowCursor(0);	/* Invisible cursor. */
	atexit(sdl1_cleanup);
}

Changes to sdl1.h.

1
2
3
4
5

6
7
8
9
10
11
12
13
#pragma once

#include <SDL.h>

extern void sdl1_init(void);

extern void sdl1_event(void);

extern unsigned long Background;
extern unsigned long Foreground;

extern void accumulate_update(int, int, int, int);

SDL_Surface *screen;





>








1
2
3
4
5
6
7
8
9
10
11
12
13
14
#pragma once

#include <SDL.h>

extern void sdl1_init(void);
extern void sdl1_default_kbd_map(void);
extern void sdl1_event(void);

extern unsigned long Background;
extern unsigned long Foreground;

extern void accumulate_update(int, int, int, int);

SDL_Surface *screen;