File tree 1 file changed +16
-0
lines changed 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -166,14 +166,30 @@ int installConsoleId(const void *cid){
166
166
int installDexCid (void ){
167
167
168
168
int res ;
169
+ char leaf [0x200 ];
170
+
171
+ memset (leaf , 0 , sizeof (leaf ));
172
+
173
+ res = ksceIdStorageReadLeaf (1 , leaf );
174
+ if (res < 0 ){
175
+ return res ;
176
+ }
169
177
170
178
/*
171
179
* Brick warning: If you installed PS TV CID to FAT/Slim, Loaded to `display driver` that doesn't fit the device on boot time, resulting in a brick.
172
180
* This is same even FAT/Slim CID to PS TV.
173
181
*/
174
182
if (ksceSblAimgrIsGenuineDolce () == 0 ){
183
+ if ((__builtin_bswap16 (* (uint16_t * )(& leaf [0x66 ])) & 0x200 ) != 0 ){ // PS TV Device
184
+ return 0x80FF0001 ;
185
+ }
186
+
175
187
res = installConsoleId (dex_cid );
176
188
}else {
189
+ if ((__builtin_bswap16 (* (uint16_t * )(& leaf [0x66 ])) & 0x200 ) == 0 ){ // Not PS TV Device
190
+ return 0x80FF0001 ;
191
+ }
192
+
177
193
res = installConsoleId (dex_cid_for_dolce );
178
194
}
179
195
You can’t perform that action at this time.
0 commit comments