UMD Info help: sceUmdGetDiscInfo(&info)

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
mypspdev
Posts: 178
Joined: Wed Jul 11, 2007 10:30 pm

UMD Info help: sceUmdGetDiscInfo(&info)

Post by mypspdev »

My code...

Code: Select all

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: Select all

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.
Mashphealh
Posts: 18
Joined: Wed Nov 28, 2007 4:18 am

Post by Mashphealh »

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

Code: Select all


printf("UMD SIZE: %d \n",info->size);
if (info->type==PSP_UMD_TYPE_GAME )
{printf("UMD TYPE: GAME \n");} 
mypspdev
Posts: 178
Joined: Wed Jul 11, 2007 10:30 pm

Post by mypspdev »

Mashphealh wrote:

Code: Select all


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...
Post Reply