Mercurial > sdl-ios-xcode
comparison src/video/riscos/SDL_riscostask.c @ 1035:974ba6ae0fa3
Date: Wed, 26 Jan 2005 13:37:09 GMT
From: Peter Naulls
Subject: RISC OS SDL Patches
Sam, I've attached a diff of the latest changes to libSDL for RISC OS
support. These changes are by Alan Buckley and myself.
The most significant of these are:
Optimised assembler blit rountines - I've attached the file
src/video/riscos/SDL_riscosASM.s which is needed for this.
Move to using /dev/dsp instead of its own audio implementation.
This means that src/audio/riscos/SDL_drenderer.c should be removed
Typo fixes. Mainly correct spelling of "RISC OS", but some from elsewhere
too.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 12 Feb 2005 18:01:31 +0000 |
parents | d74fbf56f2f6 |
children | de22ea8440d2 |
comparison
equal
deleted
inserted
replaced
1034:2eca15c3f609 | 1035:974ba6ae0fa3 |
---|---|
19 Sam Lantinga | 19 Sam Lantinga |
20 slouken@devolution.com | 20 slouken@devolution.com |
21 */ | 21 */ |
22 | 22 |
23 /* | 23 /* |
24 This file added by Alan Buckley (alan_baa@hotmail.com) to support RISCOS | 24 This file added by Alan Buckley (alan_baa@hotmail.com) to support RISC OS |
25 26 March 2003 | 25 26 March 2003 |
26 | 26 |
27 File includes routines for: | 27 File includes routines for: |
28 Setting up as a WIMP Task | 28 Setting up as a WIMP Task |
29 Reading information about the current desktop | 29 Reading information about the current desktop |
42 #ifndef DISABLE_THREADS | 42 #ifndef DISABLE_THREADS |
43 #include <pthread.h> | 43 #include <pthread.h> |
44 pthread_t main_thread; | 44 pthread_t main_thread; |
45 #endif | 45 #endif |
46 | 46 |
47 /* RISCOS variables */ | 47 /* RISC OS variables */ |
48 | 48 |
49 static int task_handle = 0; | 49 static int task_handle = 0; |
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 */ |
82 } | 82 } |
83 #endif | 83 #endif |
84 | 84 |
85 /****************************************************************** | 85 /****************************************************************** |
86 | 86 |
87 Initialise as RISCOS Wimp task | 87 Initialise as RISC OS Wimp task |
88 | 88 |
89 *******************************************************************/ | 89 *******************************************************************/ |
90 | 90 |
91 int RISCOS_InitTask() | 91 int RISCOS_InitTask() |
92 { | 92 { |
167 | 167 |
168 Finally once this value has been retrieved use it unless | 168 Finally once this value has been retrieved use it unless |
169 there is a variable set up in the form SDL$<name>$TaskName | 169 there is a variable set up in the form SDL$<name>$TaskName |
170 in which case the value of this variable will be used. | 170 in which case the value of this variable will be used. |
171 | 171 |
172 Now also gets other riscos configuration varibles | 172 Now also gets other RISC OS configuration varibles |
173 SDL$<name>$BackBuffer - set to 1 to use a system memory backbuffer in fullscreen mode | 173 SDL$<name>$BackBuffer - set to 1 to use a system memory backbuffer in fullscreen mode |
174 so updates wait until a call to SDL_UpdateRects. (default 0) | 174 so updates wait until a call to SDL_UpdateRects. (default 0) |
175 This is required for programmes where they have assumed this is | 175 This is required for programmes where they have assumed this is |
176 always the case which is contrary to the documentation. | 176 always the case which is contrary to the documentation. |
177 SDL$<name>$CloseAction | 177 SDL$<name>$CloseAction |
224 p++; /* Move over the < */ | 224 p++; /* Move over the < */ |
225 } | 225 } |
226 | 226 |
227 if (*p) | 227 if (*p) |
228 { | 228 { |
229 /* Read variables that effect the RISCOS SDL engine for this task */ | 229 /* Read variables that effect the RISC OS SDL engine for this task */ |
230 env_var = malloc(strlen(p) + 18); /* 18 is larger than the biggest variable name */ | 230 env_var = malloc(strlen(p) + 18); /* 18 is larger than the biggest variable name */ |
231 if (env_var) | 231 if (env_var) |
232 { | 232 { |
233 char *env_val; | 233 char *env_val; |
234 | 234 |
244 strcpy(env_var, "SDL$"); | 244 strcpy(env_var, "SDL$"); |
245 strcat(env_var, p); | 245 strcat(env_var, p); |
246 strcat(env_var, "$BackBuffer"); | 246 strcat(env_var, "$BackBuffer"); |
247 | 247 |
248 env_val = getenv(env_var); | 248 env_val = getenv(env_var); |
249 if (env_val && strcmp(env_val,"1") == 0) riscos_backbuffer = 1; | 249 if (env_val) riscos_backbuffer = atoi(env_val); |
250 | 250 |
251 strcpy(env_var, "SDL$"); | 251 strcpy(env_var, "SDL$"); |
252 strcat(env_var, p); | 252 strcat(env_var, p); |
253 strcat(env_var, "$CloseAction"); | 253 strcat(env_var, "$CloseAction"); |
254 | 254 |