A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Slight code cleanups, fixed sound parameter - now it saves. Old configurations will be reset.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9682 a1c6a512-1295-4272-9138-f99709370657

+73 -109
+7 -13
apps/plugins/doom/d_main.c
··· 81 81 82 82 boolean singletics = false; // debug flag to cancel adaptiveness 83 83 84 - boolean doomexit; 84 + bool doomexit; 85 85 86 86 //jff 1/22/98 parms for disabling music and sound 87 - boolean nosfxparm; 88 - boolean nomusicparm; 87 + boolean nomusicparm=0; 89 88 90 89 //jff 4/18/98 91 90 extern boolean inhelpscreens; ··· 154 153 wipestart = nowtime; 155 154 156 155 done = wipe_ScreenWipe(0,0,SCREENWIDTH,SCREENHEIGHT,tics); 157 - I_UpdateNoBlit(); 158 156 M_Drawer(); // menu is drawn even on top of wipes 159 157 I_FinishUpdate(); // page flip or blit buffer 160 158 } ··· 173 171 174 172 void D_Display (void) 175 173 { 176 - static boolean isborderstate = false; 177 - static boolean borderwillneedredraw = false; 178 - static boolean inhelpscreensstate = false; 179 - static gamestate_t oldgamestate = -1; 174 + static boolean isborderstate IDATA_ATTR= false; 175 + static boolean borderwillneedredraw IDATA_ATTR= false; 176 + static boolean inhelpscreensstate IDATA_ATTR= false; 177 + static gamestate_t oldgamestate IDATA_ATTR= -1; 180 178 boolean wipe; 181 179 boolean viewactive = false, isborder = false; 182 180 ··· 306 304 307 305 while (!doomexit) 308 306 { 309 - // frame syncronous IO operations 310 - //I_StartFrame (); 311 - 312 307 // process one or more tics 313 308 if (singletics) 314 309 { ··· 331 326 // Update display, next frame, with current state. 332 327 D_Display(); 333 328 334 - // Sound mixing for the buffer is snychronous. 335 - // I_UpdateSound(); 329 + // Give the system some time 336 330 rb->yield(); 337 331 } 338 332 }
+5 -2
apps/plugins/doom/i_system.c
··· 16 16 // GNU General Public License for more details. 17 17 // 18 18 // $Log$ 19 - // Revision 1.8 2006/04/14 21:07:55 kkurbjun 19 + // Revision 1.9 2006/04/15 22:08:36 kkurbjun 20 + // Slight code cleanups, fixed sound parameter - now it saves. Old configurations will be reset. 21 + // 22 + // Revision 1.8 2006-04-14 21:07:55 kkurbjun 20 23 // Start of profiling support for doom. 21 24 // 22 25 // Revision 1.7 2006-04-04 11:16:44 dave ··· 114 117 // 115 118 // I_Quit 116 119 // 117 - extern boolean doomexit; 120 + 118 121 void I_Quit (void) 119 122 { 120 123 I_ShutdownSound();
-10
apps/plugins/doom/i_system.h
··· 41 41 42 42 // 43 43 // Called by D_DoomLoop, 44 - // called before processing any tics in a frame 45 - // (just after displaying a frame). 46 - // Time consuming syncronous operations 47 - // are performed here (joystick reading). 48 - // Can call D_PostEvent. 49 - // 50 - void I_StartFrame (void); 51 - 52 - // 53 - // Called by D_DoomLoop, 54 44 // called before processing each tic in a frame. 55 45 // Quick syncronous operations are performed here. 56 46 // Can call D_PostEvent.
+55 -83
apps/plugins/doom/i_video.c
··· 16 16 * GNU General Public License for more details. 17 17 * 18 18 * $Log$ 19 - * Revision 1.13 2006/04/06 21:31:49 kkurbjun 19 + * Revision 1.14 2006/04/15 22:08:36 kkurbjun 20 + * Slight code cleanups, fixed sound parameter - now it saves. Old configurations will be reset. 21 + * 22 + * Revision 1.13 2006-04-06 21:31:49 kkurbjun 20 23 * Scaling code fixed by clamping down the width to a max of SCREENWIDTH. Removed some #ifdefs for glprboom 21 24 * 22 25 * Revision 1.12 2006-04-05 06:37:37 kkurbjun ··· 102 105 } 103 106 104 107 // 105 - // I_StartFrame (NOT USED) 106 - // 107 - void I_StartFrame (void) 108 - { 109 - } 110 - 111 - // 112 - // I_GetEvent (NOT USED) 113 - // 114 - void I_GetEvent(void) 115 - { 116 - } 117 - 118 - // 119 108 // I_StartTic 120 109 // 121 110 ··· 150 139 #define DOOMBUTTON_WEAPON BUTTON_ON 151 140 #endif 152 141 153 - int getkey(event_t * event) 142 + inline void getkey() 154 143 { 144 + event_t event; 155 145 // Same button handling as rockboy 156 - static unsigned int oldbuttonstate = 0, newbuttonstate=0; 146 + static unsigned int oldbuttonstate IDATA_ATTR = 0, newbuttonstate IDATA_ATTR=0 ; 157 147 158 - static int released, pressed; 148 + static int released IBSS_ATTR, pressed IBSS_ATTR; 159 149 160 150 #ifdef HAS_BUTTON_HOLD 161 - static unsigned int holdbutton=0; 162 - static int hswitch=0; 151 + static unsigned int holdbutton IDATA_ATTR=0; 152 + static int hswitch IDATA_ATTR=0; 163 153 if (rb->button_hold()&~holdbutton) 164 154 { 165 155 if(hswitch==0) 166 156 { 167 - event->type = ev_keydown; 157 + event.type = ev_keydown; 168 158 hswitch=1; 169 159 } 170 160 else 171 161 { 172 - event->type = ev_keyup; 162 + event.type = ev_keyup; 173 163 hswitch=0; 174 164 } 175 165 #if CONFIG_KEYPAD == IPOD_4G_PAD 176 166 /* Bring up the menu */ 177 - event->data1=KEY_ESCAPE; 167 + event.data1=KEY_ESCAPE; 178 168 #else 179 169 /* Enable run */ 180 - event->data1=KEY_RSHIFT; 170 + event.data1=KEY_RSHIFT; 181 171 #endif 182 - D_PostEvent(event); 172 + D_PostEvent(&event); 183 173 } 184 174 holdbutton=rb->button_hold(); 185 175 #endif ··· 190 180 oldbuttonstate = newbuttonstate; 191 181 if(released) 192 182 { 193 - event->type = ev_keyup; 183 + event.type = ev_keyup; 194 184 if(released & DOOMBUTTON_LEFT) 195 185 { 196 - event->data1=KEY_LEFTARROW; 197 - D_PostEvent(event); 186 + event.data1=KEY_LEFTARROW; 187 + D_PostEvent(&event); 198 188 } 199 189 if(released & DOOMBUTTON_RIGHT) 200 190 { 201 - event->data1=KEY_RIGHTARROW; 202 - D_PostEvent(event); 191 + event.data1=KEY_RIGHTARROW; 192 + D_PostEvent(&event); 203 193 } 204 194 #ifdef DOOMBUTTON_DOWN 205 195 if(released & DOOMBUTTON_DOWN) 206 196 { 207 - event->data1=KEY_DOWNARROW; 208 - D_PostEvent(event); 197 + event.data1=KEY_DOWNARROW; 198 + D_PostEvent(&event); 209 199 } 210 200 #endif 211 201 if(released & DOOMBUTTON_UP) 212 202 { 213 - event->data1=KEY_UPARROW; 214 - D_PostEvent(event); 203 + event.data1=KEY_UPARROW; 204 + D_PostEvent(&event); 215 205 } 216 206 if(released & DOOMBUTTON_SHOOT) 217 207 { 218 - event->data1=KEY_RCTRL; 219 - D_PostEvent(event); 208 + event.data1=KEY_RCTRL; 209 + D_PostEvent(&event); 220 210 } 221 211 if(released & DOOMBUTTON_OPEN) 222 212 { 223 - event->data1=' '; 224 - D_PostEvent(event); 213 + event.data1=' '; 214 + D_PostEvent(&event); 225 215 } 226 216 #ifdef DOOMBUTTON_ESC 227 217 if(released & DOOMBUTTON_ESC) 228 218 { 229 - event->data1=KEY_ESCAPE; 230 - D_PostEvent(event); 219 + event.data1=KEY_ESCAPE; 220 + D_PostEvent(&event); 231 221 } 232 222 #endif 233 223 #ifdef DOOMBUTTON_ENTER 234 224 if(released & DOOMBUTTON_ENTER) 235 225 { 236 - event->data1=KEY_ENTER; 237 - D_PostEvent(event); 226 + event.data1=KEY_ENTER; 227 + D_PostEvent(&event); 238 228 } 239 229 #endif 240 230 #ifdef DOOMBUTTON_WEAPON 241 231 if(released & DOOMBUTTON_WEAPON) 242 232 { 243 - event->data1 ='w'; 244 - D_PostEvent(event); 233 + event.data1 ='w'; 234 + D_PostEvent(&event); 245 235 } 246 236 #endif 247 237 } 248 238 if(pressed) 249 239 { 250 - event->type = ev_keydown; 240 + event.type = ev_keydown; 251 241 if(pressed & DOOMBUTTON_LEFT) 252 242 { 253 - event->data1=KEY_LEFTARROW; 254 - D_PostEvent(event); 243 + event.data1=KEY_LEFTARROW; 244 + D_PostEvent(&event); 255 245 } 256 246 if(pressed & DOOMBUTTON_RIGHT) 257 247 { 258 - event->data1=KEY_RIGHTARROW; 259 - D_PostEvent(event); 248 + event.data1=KEY_RIGHTARROW; 249 + D_PostEvent(&event); 260 250 } 261 251 #ifdef DOOMBUTTON_DOWN 262 252 if(pressed & DOOMBUTTON_DOWN) 263 253 { 264 - event->data1=KEY_DOWNARROW; 265 - D_PostEvent(event); 254 + event.data1=KEY_DOWNARROW; 255 + D_PostEvent(&event); 266 256 } 267 257 #endif 268 258 if(pressed & DOOMBUTTON_UP) 269 259 { 270 - event->data1=KEY_UPARROW; 271 - D_PostEvent(event); 260 + event.data1=KEY_UPARROW; 261 + D_PostEvent(&event); 272 262 } 273 263 if(pressed & DOOMBUTTON_SHOOT) 274 264 { 275 - event->data1=KEY_RCTRL; 276 - D_PostEvent(event); 265 + event.data1=KEY_RCTRL; 266 + D_PostEvent(&event); 277 267 } 278 268 if(pressed & DOOMBUTTON_OPEN) 279 269 { 280 - event->data1=' '; 281 - D_PostEvent(event); 270 + event.data1=' '; 271 + D_PostEvent(&event); 282 272 } 283 273 #ifdef DOOMBUTTON_ESC 284 274 if(pressed & DOOMBUTTON_ESC) 285 275 { 286 - event->data1=KEY_ESCAPE; 287 - D_PostEvent(event); 276 + event.data1=KEY_ESCAPE; 277 + D_PostEvent(&event); 288 278 } 289 279 #endif 290 280 #ifdef DOOMBUTTON_ENTER 291 281 if(pressed & DOOMBUTTON_ENTER) 292 282 { 293 - event->data1=KEY_ENTER; 294 - D_PostEvent(event); 283 + event.data1=KEY_ENTER; 284 + D_PostEvent(&event); 295 285 } 296 286 #endif 297 287 #ifdef DOOMBUTTON_WEAPON 298 288 if(pressed & DOOMBUTTON_WEAPON) 299 289 { 300 - event->data1='w'; 301 - D_PostEvent(event); 290 + event.data1='w'; 291 + D_PostEvent(&event); 302 292 } 303 293 #endif 304 294 } 305 - if(pressed || released) 306 - return 1; 307 - else 308 - return 0; 309 295 } 310 296 311 - event_t event; 312 - void I_StartTic (void) 297 + inline void I_StartTic (void) 313 298 { 314 - getkey(&event); 299 + getkey(); 315 300 } 316 301 317 302 ··· 362 347 pal, num_pals); 363 348 #endif 364 349 memcpy(palette,paldata+256*pal,256*sizeof(fb_data)); 365 - } 366 - 367 - // 368 - // I_UpdateNoBlit 369 - // 370 - void I_UpdateNoBlit (void) 371 - { 372 350 } 373 351 374 352 // ··· 447 425 // 448 426 void I_InitGraphics(void) 449 427 { 450 - static int firsttime=1; 451 - 452 - if (!firsttime) 453 - return; 454 - firsttime = 0; 455 - 456 428 printf("Starting Graphics engine\n"); 457 429 458 430 noprintf=1;
+1
apps/plugins/doom/m_misc.c
··· 291 291 {"pitched_sounds",{&pitched_sounds, NULL},{0, NULL},0,1, // killough 2/21/98 292 292 def_bool,ss_none, 0, 0}, // enables variable pitch in sound effects (from id's original code) 293 293 // {"samplerate",{&snd_samplerate, NULL},{22050, NULL},11025,48000, def_int,ss_none, 0, 0}, 294 + {"nosfxparm",{(void *)&nosfxparm, NULL},{0, NULL},0,1, def_bool,ss_none, 0, 0}, 294 295 {"sfx_volume",{&snd_SfxVolume, NULL},{8, NULL},0,15, def_int,ss_none, 0, 0}, 295 296 {"music_volume",{&snd_MusicVolume, NULL},{8, NULL},0,15, def_int,ss_none, 0, 0}, 296 297 {"mus_pause_opt",{&mus_pause_opt, NULL},{2, NULL},0,2, // CPhipps - music pausing
+3
apps/plugins/doom/rockdoom.c
··· 660 660 case 0: /* Sound */ 661 661 nosfxparm=!nosfxparm; // Have to invert it before setting 662 662 rb->set_option("Sound", &nosfxparm, INT, onoff, 2, NULL ); 663 + nosfxparm=!nosfxparm; 663 664 break; 664 665 665 666 case 1: /* Keys */ ··· 783 784 { 784 785 rb = api; 785 786 (void)parameter; 787 + 788 + doomexit=0; 786 789 787 790 #ifdef HAVE_ADJUSTABLE_CPU_FREQ 788 791 rb->cpu_boost(true);
+2 -1
apps/plugins/doom/rockmacros.h
··· 26 26 27 27 extern struct plugin_api* rb; 28 28 extern bool noprintf; 29 + extern bool doomexit; 29 30 30 31 /* libc functions */ 31 32 int printf(const char *fmt, ...); ··· 98 99 structure changes. 99 100 */ 100 101 #define DOOM_CONFIG_MAGIC MAKE_FOURCC('D','O','O','M') 101 - #define DOOM_CONFIG_VERSION 1 102 + #define DOOM_CONFIG_VERSION 2 102 103 103 104 #endif