Current WIP CD-ROM changes.
This commit is contained in:
@@ -65,6 +65,7 @@ extern void win_keyboard_handle(uint32_t scancode, int up, int e0, int e1);
|
||||
#include "ui_qt_mainwindow.h"
|
||||
|
||||
bool windows_is_light_theme() {
|
||||
return 0;
|
||||
// based on https://stackoverflow.com/questions/51334674/how-to-detect-windows-10-light-dark-mode-in-win32-application
|
||||
|
||||
// The value is expected to be a REG_DWORD, which is a signed 32-bit little-endian
|
||||
|
||||
@@ -91,6 +91,20 @@ ioctl_open_handle(ioctl_t *ioctl)
|
||||
ioctl_log(ioctl->log, "handle=%p, error=%x\n",
|
||||
ioctl->handle, (unsigned int) GetLastError());
|
||||
|
||||
if (ioctl->handle != INVALID_HANDLE_VALUE) {
|
||||
CDROM_SET_SPEED set_speed = { 0 };
|
||||
|
||||
set_speed.RequestType = CdromSetSpeed;
|
||||
set_speed.ReadSpeed = 0xffff;
|
||||
set_speed.WriteSpeed = 0xffff;
|
||||
set_speed.RotationControl = CdromDefaultRotation;
|
||||
|
||||
(void) DeviceIoControl(ioctl->handle, IOCTL_CDROM_SET_SPEED,
|
||||
&set_speed, sizeof(set_speed),
|
||||
NULL, 0,
|
||||
0, NULL);
|
||||
}
|
||||
|
||||
return (ioctl->handle != INVALID_HANDLE_VALUE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user