@@ -305,7 +305,7 @@ void retro_init(void)
305305 else
306306 log_cb = NULL ;
307307
308- // State that the core supports achievements.
308+ /* State that the core supports achievements. */
309309 bool achievements = true;
310310 environ_cb (RETRO_ENVIRONMENT_SET_SUPPORT_ACHIEVEMENTS , & achievements );
311311
@@ -319,7 +319,7 @@ void retro_init(void)
319319 S9xInitDisplay ();
320320 S9xInitGFX ();
321321#ifdef USE_BLARGG_APU
322- S9xInitSound (1000 , 0 ); // just give it a 1 second buffer
322+ S9xInitSound (1000 , 0 ); /* just give it a 1 second buffer */
323323 S9xSetSamplesAvailableCallback (S9xAudioCallback );
324324#else
325325 S9xInitSound ();
@@ -431,7 +431,7 @@ void retro_run(void)
431431
432432#ifdef PSP
433433 static unsigned int __attribute__((aligned (16 ))) d_list [32 ];
434- void * const texture_vram_p = (void * )(0x44200000 - (512 * 512 )); // max VRAM address - frame size
434+ void * const texture_vram_p = (void * )(0x44200000 - (512 * 512 )); /* max VRAM address - frame size */
435435 sceKernelDcacheWritebackRange (GFX .Screen , GFX .Pitch * IPPU .RenderedScreenHeight );
436436 sceGuStart (GU_DIRECT , d_list );
437437 sceGuCopyImage (GU_PSM_4444 , 0 , 0 , IPPU .RenderedScreenWidth , IPPU .RenderedScreenHeight , GFX .Pitch >> 1 , GFX .Screen , 0 , 0 , 512 , texture_vram_p );
@@ -538,6 +538,12 @@ size_t retro_serialize_size(void)
538538bool retro_serialize (void * data , size_t size )
539539{
540540 int32_t i ;
541+ #ifdef LAGFIX
542+ S9xPackStatus ();
543+ #ifndef USE_BLARGG_APU
544+ S9xAPUPackStatus ();
545+ #endif
546+ #endif
541547 S9xUpdateRTC ();
542548 S9xSRTCPreSaveState ();
543549 uint8_t * buffer = data ;
@@ -667,19 +673,19 @@ void retro_cheat_set(unsigned index, bool enabled, const char* code)
667673 uint8_t val ;
668674
669675 bool sram ;
670- uint8_t bytes [3 ];// used only by GoldFinger, ignored for now
676+ uint8_t bytes [3 ];/* used only by GoldFinger, ignored for now */
671677
672678 if (S9xGameGenieToRaw (code , & address , & val ) && S9xProActionReplayToRaw (code , & address , & val ) && S9xGoldFingerToRaw (code , & address , & sram , & val , bytes ))
673- return ; // bad code, ignore
679+ return ; /* bad code, ignore */
674680 if (index > Cheat .num_cheats )
675- return ; // cheat added in weird order, ignore
681+ return ; /* cheat added in weird order, ignore */
676682 if (index == Cheat .num_cheats )
677683 Cheat .num_cheats ++ ;
678684
679685 Cheat .c [index ].address = address ;
680686 Cheat .c [index ].byte = val ;
681687 Cheat .c [index ].enabled = enabled ;
682- Cheat .c [index ].saved = false; // it'll be saved next time cheats run anyways
688+ Cheat .c [index ].saved = false; /* it'll be saved next time cheats run anyways */
683689
684690 Settings .ApplyCheats = true;
685691 S9xApplyCheats ();
0 commit comments