forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

UMD Info help: sceUmdGetDiscInfo(&info)

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
mypspdev



Joined: 11 Jul 2007
Posts: 178

PostPosted: Sat Aug 23, 2008 11:45 pm    Post subject: UMD Info help: sceUmdGetDiscInfo(&info) Reply with quote

My code...

Code:
int MyUMDInfo;
int MyUMDState;
pspUmdInfo info;
if (sceUmdCheckMedium()==0)
{
   printf("No UMD present                \n");
}
else
{
   printf("UMD present                   \n");
   MyUMDInfo=sceUmdGetDiscInfo(&info);

##### here I'd like to print out size and type (audio, video or game)

                sceUmdActivate(1, "disc0:");       sceUmdWaitDriveStat(PSP_UMD_READY);
}
MyUMDState=sceUmdGetDriveStat();

I'd like to print out the UMD Info: size and type, but I cannot.

My unsuccessfull attempt:

Code:
printf("UMD SIZE: %l \n",info.size);
if (info.type==PSP_UMD_TYPE_GAME )
{printf("UMD TYPE: GAME \n");}
..... so on for other type....


Please any help?

thanks a lot in advance.
Back to top
View user's profile Send private message
Mashphealh



Joined: 28 Nov 2007
Posts: 18

PostPosted: Sun Aug 24, 2008 8:48 am    Post subject: Reply with quote

If it's not compile , the reason can be because pspumdinfo it's a typedef struct, so you must write your code thus :

Code:


printf("UMD SIZE: %d \n",info->size);
if (info->type==PSP_UMD_TYPE_GAME )
{printf("UMD TYPE: GAME \n");}
Back to top
View user's profile Send private message
mypspdev



Joined: 11 Jul 2007
Posts: 178

PostPosted: Sun Aug 24, 2008 5:26 pm    Post subject: Reply with quote

Mashphealh wrote:
Code:


printf("UMD SIZE: %d \n",info->size);
if (info->type==PSP_UMD_TYPE_GAME )
{printf("UMD TYPE: GAME \n");}


Thanks, ... being c-programmer-hobbyst... it happens...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group