Mercurial > sdl-ios-xcode
comparison src/video/riscos/SDL_riscostask.c @ 1059:de22ea8440d2
Date: Tue, 10 May 2005 22:15:25 +0100
From: Peter Naulls
Subject: RISC OS SDL patch
Some of the RISC OS audio code is no longer used do to the switch to
/dev/dsp, and can be removed as per the attached diff.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 16 May 2005 07:43:46 +0000 |
parents | 974ba6ae0fa3 |
children | c9b51268668f |
comparison
equal
deleted
inserted
replaced
1058:e6c91fd1911e | 1059:de22ea8440d2 |
---|---|
50 static int wimp_version = 0; | 50 static int wimp_version = 0; |
51 | 51 |
52 /* RISC OS variables to help compatability with certain programs */ | 52 /* RISC OS variables to help compatability with certain programs */ |
53 int riscos_backbuffer = 0; /* Create a back buffer in system memory for full screen mode */ | 53 int riscos_backbuffer = 0; /* Create a back buffer in system memory for full screen mode */ |
54 int riscos_closeaction = 1; /* Close icon action */ | 54 int riscos_closeaction = 1; /* Close icon action */ |
55 int riscos_audiobuffer = 0; /* Audio buffer size */ | |
56 | 55 |
57 static int stored_mode = -1; /* -1 when in desktop, mode number or pointer when full screen */ | 56 static int stored_mode = -1; /* -1 when in desktop, mode number or pointer when full screen */ |
58 | 57 |
59 extern int mouseInWindow; /* Mouse is in WIMP window */ | 58 extern int mouseInWindow; /* Mouse is in WIMP window */ |
60 | 59 |
176 always the case which is contrary to the documentation. | 175 always the case which is contrary to the documentation. |
177 SDL$<name>$CloseAction | 176 SDL$<name>$CloseAction |
178 0 Don't show close icon | 177 0 Don't show close icon |
179 1 Show close icon | 178 1 Show close icon |
180 | 179 |
181 SDL$<name>$AudioBuffer - set to number of samples to buffer | |
182 in advance. Will default to a minimum of 1024 or twice | |
183 amount requested by program whichever is largest. | |
184 If not specified default is amount for 10 csecs. | |
185 Time that will be pre-buffered can be calculated as | |
186 sample to buffer * 1000 / freq milliseconds. | |
187 | |
188 ***************************************************************************/ | 180 ***************************************************************************/ |
189 | 181 |
190 int RISCOS_GetTaskName(char *task_name) | 182 int RISCOS_GetTaskName(char *task_name) |
191 { | 183 { |
192 _kernel_swi_regs regs; | 184 _kernel_swi_regs regs; |
253 strcat(env_var, "$CloseAction"); | 245 strcat(env_var, "$CloseAction"); |
254 | 246 |
255 env_val = getenv(env_var); | 247 env_val = getenv(env_var); |
256 if (env_val && strcmp(env_val,"0") == 0) riscos_closeaction = 0; | 248 if (env_val && strcmp(env_val,"0") == 0) riscos_closeaction = 0; |
257 | 249 |
258 strcpy(env_var, "SDL$"); | |
259 strcat(env_var, p); | |
260 strcat(env_var, "$AudioBuffer"); | |
261 | |
262 env_val = getenv(env_var); | |
263 riscos_audiobuffer = atoi(env_val); | |
264 | |
265 free(env_var); | 250 free(env_var); |
266 } | 251 } |
267 | 252 |
268 if (task_name[0] == 0) strncpy(task_name, p, 31); | 253 if (task_name[0] == 0) strncpy(task_name, p, 31); |
269 task_name[31] = 0; | 254 task_name[31] = 0; |