devkitPro / libctru

Homebrew development library for Nintendo 3DS/Horizon OS user mode (Arm11)
https://libctru.devkitpro.org/
771 stars 170 forks source link

Cfg:GetSystemModel wrong return value #194

Closed Rinnegatamante closed 9 years ago

Rinnegatamante commented 9 years ago

Calling this on an O3DS returns me 1 as return value ( http://3dbrew.org/wiki/Cfg:GetSystemModel )

yellows8 commented 9 years ago

Sounds like yet another case of ignoring the result-code......

smealum commented 9 years ago

https://github.com/smealum/ctrulib/blob/master/libctru/source/services/cfgu.c#L66-L78

code looks fine to me. have you checked the return value to see if there are any errors ?

Rinnegatamante commented 9 years ago

It seems getModel returns an error: 0xD900182F.

yellows8 commented 9 years ago

Don't know why that would happen if you initialized cfgu correctly, unless you corrupted the cfgu handle somehow.

Rinnegatamante commented 9 years ago

I use other cfgu functions without any problem (like CFGU_SecureInfoGetRegion, CFGU_GetSystemLanguage, CFGU_GetConfigInfoBlk2). This seems to be the only one causing this kind of errors.

profi200 commented 9 years ago

Passing wrong parameters/a bad pointer? Try it outside of your lua environment on the same 3DS.

Rinnegatamante commented 9 years ago

Nvm, updating to last ctrulib solved the issue ;)