@@ -28,18 +28,17 @@ int mcman_wr_block = -1;
2828int mcman_wr_flag3 = -10 ;
2929int mcman_curdircluster = -1 ;
3030
31- #ifndef BUILDING_XFROMMAN
31+ #if !defined( BUILDING_XFROMMAN ) && !defined( BUILDING_VMCMAN )
3232int timer_ID ;
3333#endif
3434int PS1CardFlag = 1 ;
3535
3636union mcman_pagebuf mcman_pagebuf ;
3737union mcman_PS1PDApagebuf mcman_PS1PDApagebuf ;
3838
39- #ifndef BUILDING_XFROMMAN
39+ #if !defined( BUILDING_XFROMMAN ) && !defined( BUILDING_VMCMAN )
4040extern struct irx_export_table _exp_mcman ;
41- #endif
42- #ifdef BUILDING_XFROMMAN
41+ #elif defined(BUILDING_XFROMMAN )
4342extern struct irx_export_table _exp_xfromman ;
4443#endif
4544
@@ -155,11 +154,10 @@ int MCMAN_ENTRYPOINT(int argc, char *argv[])
155154 DPRINTF ("_start...\n" );
156155
157156 DPRINTF ("registering exports...\n" );
158- #ifndef BUILDING_XFROMMAN
157+ #if !defined( BUILDING_XFROMMAN ) && !defined( BUILDING_VMCMAN )
159158 if (RegisterLibraryEntries (& _exp_mcman ) != 0 )
160159 return MODULE_NO_RESIDENT_END ;
161- #endif
162- #ifdef BUILDING_XFROMMAN
160+ #elif defined(BUILDING_XFROMMAN )
163161 if (RegisterLibraryEntries (& _exp_xfromman ) != 0 )
164162 return MODULE_NO_RESIDENT_END ;
165163#endif
@@ -180,7 +178,7 @@ int MCMAN_ENTRYPOINT(int argc, char *argv[])
180178 DPRINTF ("initdev...\n" );
181179 mcman_initdev ();
182180
183- #ifndef BUILDING_XFROMMAN
181+ #if !defined( BUILDING_XFROMMAN ) && !defined( BUILDING_VMCMAN )
184182 timer_ID = ReferHardTimer (1 , 32 , 0 , 0x6309 );
185183
186184 if (timer_ID != -150 )
@@ -421,7 +419,7 @@ int mcman_detectcard(int port, int slot)
421419 DPRINTF ("mcman_detectcard port%d slot%d\n" , port , slot );
422420 mcdi = (MCDevInfo * )& mcman_devinfos [port ][slot ];
423421
424- #ifndef BUILDING_XFROMMAN
422+ #if !defined( BUILDING_XFROMMAN ) && !defined( BUILDING_VMCMAN )
425423 if ((mcdi -> cardtype == sceMcTypeNoCard ) || (mcdi -> cardtype == sceMcTypePS2 )) {
426424 r = mcman_probePS2Card2 (port , slot );
427425 if (r < -9 ) {
@@ -471,8 +469,7 @@ int mcman_detectcard(int port, int slot)
471469 return sceMcResSucceed ;
472470 }
473471 }
474- #endif
475- #ifdef BUILDING_XFROMMAN
472+ #else
476473 r = mcman_probePS2Card2 (port , slot );
477474 if (r >= -9 ) {
478475 mcdi -> cardtype = sceMcTypePS2 ;
@@ -498,7 +495,7 @@ int McDetectCard2(int port, int slot) // Export #21 XMCMAN only
498495
499496 mcdi = (MCDevInfo * )& mcman_devinfos [port ][slot ];
500497
501- #ifndef BUILDING_XFROMMAN
498+ #if !defined( BUILDING_XFROMMAN ) && !defined( BUILDING_VMCMAN )
502499 if ((mcdi -> cardtype == sceMcTypeNoCard ) || (mcdi -> cardtype == sceMcTypePS2 )) {
503500 r = mcman_probePS2Card (port , slot );
504501 if (r < -9 ) {
@@ -548,8 +545,7 @@ int McDetectCard2(int port, int slot) // Export #21 XMCMAN only
548545 return sceMcResSucceed ;
549546 }
550547 }
551- #endif
552- #ifdef BUILDING_XFROMMAN
548+ #else
553549 r = mcman_probePS2Card (port , slot );
554550 if (r >= -9 ) {
555551 mcdi -> cardtype = sceMcTypePS2 ;
@@ -2480,7 +2476,7 @@ int mcman_setPS1devinfos(int port, int slot)
24802476 if (r < 0 )
24812477 return -14 ;
24822478
2483- #ifndef BUILDING_XFROMMAN
2479+ #if !defined( BUILDING_XFROMMAN ) && !defined( BUILDING_VMCMAN )
24842480 if (mcman_sio2outbufs_PS1PDA [1 ] != 0 )
24852481 return -15 ;
24862482#endif
0 commit comments