mirror of
https://github.com/akuker/RASCSI.git
synced 2025-01-11 09:29:53 +00:00
Set block size in device info
This commit is contained in:
parent
4c0ff2b421
commit
d5a2f230fd
@ -298,6 +298,30 @@ const PbDevices GetDevices()
|
|||||||
pbDevice->set_lockable(device->IsLockable());
|
pbDevice->set_lockable(device->IsLockable());
|
||||||
pbDevice->set_locked(device->IsLocked());
|
pbDevice->set_locked(device->IsLocked());
|
||||||
|
|
||||||
|
const Disk *disk = dynamic_cast<Disk*>(device);
|
||||||
|
if (disk) {
|
||||||
|
switch (disk->GetSectorSize()) {
|
||||||
|
case 9:
|
||||||
|
pbDevice->set_block_size(512);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 10:
|
||||||
|
pbDevice->set_block_size(1024);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 11:
|
||||||
|
pbDevice->set_block_size(2048);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 12:
|
||||||
|
pbDevice->set_block_size(4096);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const FileSupport *fileSupport = dynamic_cast<FileSupport *>(device);
|
const FileSupport *fileSupport = dynamic_cast<FileSupport *>(device);
|
||||||
if (fileSupport) {
|
if (fileSupport) {
|
||||||
Filepath filepath;
|
Filepath filepath;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user