Merge branch 'master' into net-add-tap-backend
@@ -89,11 +89,7 @@ add_library(ui STATIC
|
||||
qt_hardwarerenderer.hpp
|
||||
qt_openglrenderer.cpp
|
||||
qt_openglrenderer.hpp
|
||||
qt_opengloptions.cpp
|
||||
qt_opengloptions.hpp
|
||||
qt_opengloptionsdialog.cpp
|
||||
qt_opengloptionsdialog.hpp
|
||||
qt_opengloptionsdialog.ui
|
||||
qt_glsl_parser.cpp
|
||||
|
||||
qt_settings.cpp
|
||||
qt_settings.hpp
|
||||
@@ -141,6 +137,11 @@ add_library(ui STATIC
|
||||
qt_joystickconfiguration.cpp
|
||||
qt_joystickconfiguration.hpp
|
||||
qt_joystickconfiguration.ui
|
||||
qt_keybind.cpp
|
||||
qt_keybind.hpp
|
||||
qt_keybind.ui
|
||||
qt_singlekeyseqedit.cpp
|
||||
qt_singlekeyseqedit.hpp
|
||||
|
||||
qt_filefield.cpp
|
||||
qt_filefield.hpp
|
||||
@@ -188,7 +189,62 @@ add_library(ui STATIC
|
||||
qt_mediahistorymanager.cpp
|
||||
qt_mediahistorymanager.hpp
|
||||
|
||||
qt_updatecheck.cpp
|
||||
qt_updatecheck.hpp
|
||||
qt_updatecheckdialog.cpp
|
||||
qt_updatecheckdialog.hpp
|
||||
qt_updatecheckdialog.ui
|
||||
qt_updatedetails.cpp
|
||||
qt_updatedetails.hpp
|
||||
qt_updatedetails.ui
|
||||
qt_downloader.cpp
|
||||
qt_downloader.hpp
|
||||
|
||||
qt_vmmanager_clientsocket.cpp
|
||||
qt_vmmanager_clientsocket.hpp
|
||||
qt_vmmanager_serversocket.cpp
|
||||
qt_vmmanager_serversocket.hpp
|
||||
qt_vmmanager_protocol.cpp
|
||||
qt_vmmanager_protocol.hpp
|
||||
qt_vmmanager_details.hpp
|
||||
qt_vmmanager_details.cpp
|
||||
qt_vmmanager_details.ui
|
||||
qt_vmmanager_addmachine.cpp
|
||||
qt_vmmanager_addmachine.hpp
|
||||
qt_vmmanager_detailsection.cpp
|
||||
qt_vmmanager_detailsection.hpp
|
||||
qt_vmmanager_detailsection.ui
|
||||
qt_vmmanager_listviewdelegate.hpp
|
||||
qt_vmmanager_listviewdelegate.cpp
|
||||
qt_vmmanager_preferences.cpp
|
||||
qt_vmmanager_preferences.hpp
|
||||
qt_vmmanager_preferences.ui
|
||||
qt_vmmanager_main.hpp
|
||||
qt_vmmanager_main.cpp
|
||||
qt_vmmanager_main.ui
|
||||
qt_vmmanager_model.cpp
|
||||
qt_vmmanager_model.hpp
|
||||
qt_vmmanager_system.cpp
|
||||
qt_vmmanager_system.hpp
|
||||
qt_vmmanager_config.cpp
|
||||
qt_vmmanager_config.hpp
|
||||
qt_vmmanager_mainwindow.cpp
|
||||
qt_vmmanager_mainwindow.hpp
|
||||
qt_vmmanager_mainwindow.ui
|
||||
|
||||
../qt_resources.qrc
|
||||
./qdarkstyle/dark/darkstyle.qrc
|
||||
|
||||
qt_openglshadermanagerdialog.hpp
|
||||
qt_openglshadermanagerdialog.cpp
|
||||
qt_openglshadermanagerdialog.ui
|
||||
|
||||
qt_openglshaderconfig.hpp
|
||||
qt_openglshaderconfig.cpp
|
||||
qt_openglshaderconfig.ui
|
||||
|
||||
qt_iconindicators.hpp
|
||||
qt_iconindicators.cpp
|
||||
)
|
||||
|
||||
if(RTMIDI)
|
||||
@@ -199,10 +255,15 @@ if(WACOM)
|
||||
target_compile_definitions(ui PRIVATE USE_WACOM)
|
||||
endif()
|
||||
|
||||
if(CDROM_MITSUMI)
|
||||
target_compile_definitions(ui PRIVATE USE_CDROM_MITSUMI)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
enable_language(RC)
|
||||
target_sources(86Box PUBLIC 86Box-qt.rc)
|
||||
target_sources(plat PRIVATE win_dynld.c)
|
||||
target_link_libraries(86Box dwmapi)
|
||||
|
||||
# CMake 3.22 messed this up for clang/clang++
|
||||
# See https://gitlab.kitware.com/cmake/cmake/-/issues/22611
|
||||
@@ -435,6 +496,7 @@ if (UNIX AND NOT APPLE AND NOT HAIKU)
|
||||
set(WL_SOURCE_VAR)
|
||||
ecm_add_wayland_client_protocol(WL_SOURCE_VAR PROTOCOL ${CMAKE_SOURCE_DIR}/wl_protocols/relative-pointer-unstable-v1.xml BASENAME relative-pointer-unstable-v1)
|
||||
ecm_add_wayland_client_protocol(WL_SOURCE_VAR PROTOCOL ${CMAKE_SOURCE_DIR}/wl_protocols/pointer-constraints-unstable-v1.xml BASENAME pointer-constraints-unstable-v1)
|
||||
ecm_add_wayland_client_protocol(WL_SOURCE_VAR PROTOCOL ${CMAKE_SOURCE_DIR}/wl_protocols/keyboard-shortcuts-inhibit-unstable-v1.xml BASENAME keyboard-shortcuts-inhibit-unstable-v1)
|
||||
target_include_directories(ui PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${Qt${QT_MAJOR}Gui_PRIVATE_INCLUDE_DIRS})
|
||||
target_sources(ui PRIVATE ${WL_SOURCE_VAR} wl_mouse.cpp)
|
||||
if (XKBCOMMON_FOUND)
|
||||
|
||||
BIN
src/qt/assets/86box-wizard.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
src/qt/assets/systemicons/cpq_deskpro.png
Normal file
|
After Width: | Height: | Size: 239 KiB |
BIN
src/qt/assets/systemicons/cpq_port_386.png
Normal file
|
After Width: | Height: | Size: 245 KiB |
BIN
src/qt/assets/systemicons/cpq_port_II.png
Normal file
|
After Width: | Height: | Size: 158 KiB |
BIN
src/qt/assets/systemicons/cpq_port_III.png
Normal file
|
After Width: | Height: | Size: 198 KiB |
BIN
src/qt/assets/systemicons/cpq_portable.png
Normal file
|
After Width: | Height: | Size: 137 KiB |
BIN
src/qt/assets/systemicons/cpq_pres_2240.png
Normal file
|
After Width: | Height: | Size: 162 KiB |
BIN
src/qt/assets/systemicons/cpq_pres_4500.png
Normal file
|
After Width: | Height: | Size: 129 KiB |
BIN
src/qt/assets/systemicons/ibm330.png
Normal file
|
After Width: | Height: | Size: 182 KiB |
BIN
src/qt/assets/systemicons/ibm_at.png
Normal file
|
After Width: | Height: | Size: 276 KiB |
BIN
src/qt/assets/systemicons/ibm_pc_81.png
Normal file
|
After Width: | Height: | Size: 289 KiB |
BIN
src/qt/assets/systemicons/ibm_pc_82.png
Normal file
|
After Width: | Height: | Size: 289 KiB |
BIN
src/qt/assets/systemicons/ibm_pcjr.png
Normal file
|
After Width: | Height: | Size: 289 KiB |
BIN
src/qt/assets/systemicons/ibm_ps2_m70.png
Normal file
|
After Width: | Height: | Size: 214 KiB |
BIN
src/qt/assets/systemicons/ibm_ps2_m80.png
Normal file
|
After Width: | Height: | Size: 259 KiB |
BIN
src/qt/assets/systemicons/ibm_psvp_486.png
Normal file
|
After Width: | Height: | Size: 212 KiB |
BIN
src/qt/assets/systemicons/ibm_psvp_p60.png
Normal file
|
After Width: | Height: | Size: 212 KiB |
BIN
src/qt/assets/systemicons/ibm_xt_82.png
Normal file
|
After Width: | Height: | Size: 289 KiB |
BIN
src/qt/assets/systemicons/ibm_xt_86.png
Normal file
|
After Width: | Height: | Size: 289 KiB |
BIN
src/qt/assets/systemicons/olivetti_m19.png
Normal file
|
After Width: | Height: | Size: 257 KiB |
BIN
src/qt/assets/systemicons/olivetti_m21.png
Normal file
|
After Width: | Height: | Size: 317 KiB |
BIN
src/qt/assets/systemicons/olivetti_m24.png
Normal file
|
After Width: | Height: | Size: 204 KiB |
BIN
src/qt/assets/systemicons/olivetti_m24sp.png
Normal file
|
After Width: | Height: | Size: 204 KiB |
BIN
src/qt/assets/systemicons/os_archlinux_x2.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
src/qt/assets/systemicons/os_cloud_x2.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/qt/assets/systemicons/os_debian_x2.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
src/qt/assets/systemicons/os_dos_x2.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
src/qt/assets/systemicons/os_fedora_x2.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
src/qt/assets/systemicons/os_freebsd_x2.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
src/qt/assets/systemicons/os_gentoo_x2.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
src/qt/assets/systemicons/os_jrockitve_x2.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
src/qt/assets/systemicons/os_l4_x2.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
src/qt/assets/systemicons/os_linux22_x2.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
src/qt/assets/systemicons/os_linux24_x2.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
src/qt/assets/systemicons/os_linux26_x2.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
src/qt/assets/systemicons/os_linux_x2.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
src/qt/assets/systemicons/os_macosx_x2.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
src/qt/assets/systemicons/os_mandriva_x2.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
src/qt/assets/systemicons/os_netbsd_x2.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
src/qt/assets/systemicons/os_netware_x2.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
src/qt/assets/systemicons/os_openbsd_x2.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
src/qt/assets/systemicons/os_opensuse_x2.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
src/qt/assets/systemicons/os_oracle_x2.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
src/qt/assets/systemicons/os_oraclesolaris_x2.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
src/qt/assets/systemicons/os_os2_other_x2.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
src/qt/assets/systemicons/os_os2ecs_x2.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
src/qt/assets/systemicons/os_os2warp3_x2.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
src/qt/assets/systemicons/os_os2warp45_x2.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
src/qt/assets/systemicons/os_os2warp4_x2.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
src/qt/assets/systemicons/os_other_x2.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
src/qt/assets/systemicons/os_qnx_x2.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
src/qt/assets/systemicons/os_redhat_x2.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
src/qt/assets/systemicons/os_solaris_x2.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
src/qt/assets/systemicons/os_turbolinux_x2.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
src/qt/assets/systemicons/os_ubuntu_x2.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
src/qt/assets/systemicons/os_win10_x2.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
src/qt/assets/systemicons/os_win2k3_x2.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
src/qt/assets/systemicons/os_win2k8_x2.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
src/qt/assets/systemicons/os_win2k_x2.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
src/qt/assets/systemicons/os_win31_x2.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
src/qt/assets/systemicons/os_win7_x2.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
src/qt/assets/systemicons/os_win81_x2.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
src/qt/assets/systemicons/os_win8_x2.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
src/qt/assets/systemicons/os_win95_x2.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
src/qt/assets/systemicons/os_win98_x2.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
src/qt/assets/systemicons/os_win_other_x2.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
src/qt/assets/systemicons/os_winme_x2.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
src/qt/assets/systemicons/os_winnt4_x2.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
src/qt/assets/systemicons/os_winvista_x2.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
src/qt/assets/systemicons/os_winxp_x2.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
src/qt/assets/systemicons/os_xandros_x2.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
src/qt/assets/systemicons/pb_bora_pro.png
Normal file
|
After Width: | Height: | Size: 169 KiB |
BIN
src/qt/assets/systemicons/pb_pb410.png
Normal file
|
After Width: | Height: | Size: 205 KiB |
BIN
src/qt/assets/systemicons/pb_pb640.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
src/qt/assets/systemicons/pb_pb680.png
Normal file
|
After Width: | Height: | Size: 169 KiB |
BIN
src/qt/assets/systemicons/tandy_1000.png
Normal file
|
After Width: | Height: | Size: 156 KiB |
BIN
src/qt/assets/systemicons/tandy_1000_hx.png
Normal file
|
After Width: | Height: | Size: 175 KiB |
BIN
src/qt/assets/systemicons/tandy_1000_sl2.png
Normal file
|
After Width: | Height: | Size: 209 KiB |
BIN
src/qt/assets/systemicons/toshiba_t1000.png
Normal file
|
After Width: | Height: | Size: 153 KiB |
BIN
src/qt/assets/systemicons/toshiba_t1200.png
Normal file
|
After Width: | Height: | Size: 285 KiB |
BIN
src/qt/assets/systemicons/toshiba_t1200_hdd.png
Normal file
|
After Width: | Height: | Size: 285 KiB |
@@ -17,236 +17,226 @@
|
||||
* Copyright 2023 Miran Grca.
|
||||
*/
|
||||
#include <inttypes.h>
|
||||
#ifdef ENABLE_IOCTL_LOG
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include <86box/scsi_device.h>
|
||||
#include <86box/cdrom.h>
|
||||
#include <86box/log.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/plat_cdrom.h>
|
||||
#include <86box/plat_cdrom_ioctl.h>
|
||||
|
||||
/* The addresses sent from the guest are absolute, ie. a LBA of 0 corresponds to a MSF of 00:00:00. Otherwise, the counter displayed by the guest is wrong:
|
||||
there is a seeming 2 seconds in which audio plays but counter does not move, while a data track before audio jumps to 2 seconds before the actual start
|
||||
of the audio while audio still plays. With an absolute conversion, the counter is fine. */
|
||||
#define MSFtoLBA(m, s, f) ((((m * 60) + s) * 75) + f)
|
||||
|
||||
typedef struct dummy_cdrom_ioctl_t {
|
||||
int toc_valid;
|
||||
} dummy_cdrom_ioctl_t;
|
||||
typedef struct ioctl_t {
|
||||
cdrom_t *dev;
|
||||
void *log;
|
||||
void *handle;
|
||||
char path[256];
|
||||
} ioctl_t;
|
||||
|
||||
#ifdef ENABLE_DUMMY_CDROM_IOCTL_LOG
|
||||
int dummy_cdrom_ioctl_do_log = ENABLE_DUMMY_CDROM_IOCTL_LOG;
|
||||
#ifdef ENABLE_IOCTL_LOG
|
||||
int ioctl_do_log = ENABLE_IOCTL_LOG;
|
||||
|
||||
void
|
||||
dummy_cdrom_ioctl_log(const char *fmt, ...)
|
||||
ioctl_log(void *priv, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
if (dummy_cdrom_ioctl_do_log) {
|
||||
if (ioctl_do_log) {
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
pclog_ex(fmt, ap);
|
||||
log_out(priv, fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
#else
|
||||
# define dummy_cdrom_ioctl_log(fmt, ...)
|
||||
# define ioctl_log(priv, fmt, ...)
|
||||
#endif
|
||||
|
||||
static int
|
||||
plat_cdrom_open(void *local)
|
||||
/* Internal functions. */
|
||||
static void
|
||||
ioctl_close_handle(UNUSED(const ioctl_t *ioctl))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
plat_cdrom_load(void *local)
|
||||
ioctl_open_handle(UNUSED(ioctl_t *ioctl))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
plat_cdrom_read_toc(void *local)
|
||||
ioctl_read_toc(ioctl_t *ioctl)
|
||||
{
|
||||
dummy_cdrom_ioctl_t *ioctl = (dummy_cdrom_ioctl_t *) local;
|
||||
|
||||
if (!ioctl->toc_valid)
|
||||
ioctl->toc_valid = 1;
|
||||
}
|
||||
|
||||
void
|
||||
plat_cdrom_get_raw_track_info(UNUSED(void *local), int *num, raw_track_info_t *rti)
|
||||
/* Shared functions. */
|
||||
static int
|
||||
ioctl_get_track_info(UNUSED(const void *local), UNUSED(const uint32_t track),
|
||||
UNUSED(int end), UNUSED(track_info_t *ti))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
ioctl_get_raw_track_info(UNUSED(const void *local), int *num, uint8_t *rti)
|
||||
{
|
||||
*num = 1;
|
||||
memset(rti, 0x00, 11);
|
||||
}
|
||||
|
||||
int
|
||||
plat_cdrom_is_track_audio(void *local, uint32_t sector)
|
||||
static int
|
||||
ioctl_is_track_pre(const void *local, UNUSED(const uint32_t sector))
|
||||
{
|
||||
dummy_cdrom_ioctl_t *ioctl = (dummy_cdrom_ioctl_t *) local;
|
||||
ioctl_t *ioctl = (ioctl_t *) local;
|
||||
|
||||
plat_cdrom_read_toc(ioctl);
|
||||
|
||||
const int ret = 0;
|
||||
|
||||
dummy_cdrom_ioctl_log("plat_cdrom_is_track_audio(%08X): %i\n", sector, ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
plat_cdrom_is_track_pre(void *local, uint32_t sector)
|
||||
{
|
||||
dummy_cdrom_ioctl_t *ioctl = (dummy_cdrom_ioctl_t *) local;
|
||||
|
||||
plat_cdrom_read_toc(ioctl);
|
||||
ioctl_read_toc(ioctl);
|
||||
|
||||
const int ret = 0;
|
||||
|
||||
dummy_cdrom_ioctl_log("plat_cdrom_is_track_audio(%08X): %i\n", sector, ret);
|
||||
ioctl_log("ioctl_is_track_audio(%08X): %i\n", sector, ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
plat_cdrom_get_track_start(void *local, uint32_t sector, uint8_t *attr, uint8_t *track)
|
||||
static int
|
||||
ioctl_read_sector(const void *local, UNUSED(uint8_t *buffer), UNUSED(uint32_t const sector))
|
||||
{
|
||||
dummy_cdrom_ioctl_t *ioctl = (dummy_cdrom_ioctl_t *) local;
|
||||
ioctl_t *ioctl = (ioctl_t *) local;
|
||||
|
||||
plat_cdrom_read_toc(ioctl);
|
||||
ioctl_open_handle(ioctl);
|
||||
|
||||
return 0x00000000;
|
||||
}
|
||||
ioctl_close_handle(ioctl);
|
||||
|
||||
uint32_t
|
||||
plat_cdrom_get_last_block(void *local)
|
||||
{
|
||||
dummy_cdrom_ioctl_t *ioctl = (dummy_cdrom_ioctl_t *) local;
|
||||
|
||||
plat_cdrom_read_toc(ioctl);
|
||||
|
||||
return 0x00000000;
|
||||
}
|
||||
|
||||
int
|
||||
plat_cdrom_ext_medium_changed(void *local)
|
||||
{
|
||||
dummy_cdrom_ioctl_t *ioctl = (dummy_cdrom_ioctl_t *) local;
|
||||
int ret = 0;
|
||||
|
||||
dummy_cdrom_ioctl_log("plat_cdrom_ext_medium_changed(): %i\n", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* This replaces both Info and EndInfo, they are specified by a variable. */
|
||||
int
|
||||
plat_cdrom_get_audio_track_info(void *local, UNUSED(int end), int track, int *track_num, TMSF *start, uint8_t *attr)
|
||||
{
|
||||
dummy_cdrom_ioctl_t *ioctl = (dummy_cdrom_ioctl_t *) local;
|
||||
|
||||
plat_cdrom_read_toc(ioctl);
|
||||
|
||||
if ((track < 1) || (track == 0xaa)) {
|
||||
dummy_cdrom_ioctl_log("plat_cdrom_get_audio_track_info(%02i)\n", track);
|
||||
return 0;
|
||||
}
|
||||
|
||||
start->min = 0;
|
||||
start->sec = 0;
|
||||
start->fr = 2;
|
||||
|
||||
*track_num = 1;
|
||||
*attr = 0x14;
|
||||
|
||||
dummy_cdrom_ioctl_log("plat_cdrom_get_audio_track_info(%02i): %02i:%02i:%02i, %02i, %02X\n",
|
||||
track, start->min, start->sec, start->fr, *track_num, *attr);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* TODO: See if track start is adjusted by 150 or not. */
|
||||
int
|
||||
plat_cdrom_get_audio_sub(UNUSED(void *local), UNUSED(uint32_t sector), uint8_t *attr, uint8_t *track, uint8_t *index,
|
||||
TMSF *rel_pos, TMSF *abs_pos)
|
||||
{
|
||||
*track = 1;
|
||||
*attr = 0x14;
|
||||
*index = 1;
|
||||
|
||||
rel_pos->min = 0;
|
||||
rel_pos->sec = 0;
|
||||
rel_pos->fr = 0;
|
||||
abs_pos->min = 0;
|
||||
abs_pos->sec = 0;
|
||||
abs_pos->fr = 2;
|
||||
|
||||
dummy_cdrom_ioctl_log("plat_cdrom_get_audio_sub(): %02i, %02X, %02i, %02i:%02i:%02i, %02i:%02i:%02i\n",
|
||||
*track, *attr, *index, rel_pos->min, rel_pos->sec, rel_pos->fr, abs_pos->min, abs_pos->sec, abs_pos->fr);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
plat_cdrom_get_sector_size(UNUSED(void *local), UNUSED(uint32_t sector))
|
||||
{
|
||||
dummy_cdrom_ioctl_log("BytesPerSector=2048\n");
|
||||
|
||||
return 2048;
|
||||
}
|
||||
|
||||
int
|
||||
plat_cdrom_read_sector(void *local, uint8_t *buffer, uint32_t sector)
|
||||
{
|
||||
dummy_cdrom_ioctl_t *ioctl = (dummy_cdrom_ioctl_t *) local;
|
||||
|
||||
plat_cdrom_open(ioctl);
|
||||
|
||||
/* Raw */
|
||||
dummy_cdrom_ioctl_log("Raw\n");
|
||||
|
||||
plat_cdrom_close(ioctl);
|
||||
|
||||
dummy_cdrom_ioctl_log("ReadSector sector=%d.\n", sector);
|
||||
ioctl_log("ReadSector sector=%d.\n", sector);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
plat_cdrom_eject(void *local)
|
||||
static uint8_t
|
||||
ioctl_get_track_type(UNUSED(const void *local), UNUSED(const uint32_t sector))
|
||||
{
|
||||
dummy_cdrom_ioctl_t *ioctl = (dummy_cdrom_ioctl_t *) local;
|
||||
|
||||
plat_cdrom_open(ioctl);
|
||||
plat_cdrom_close(ioctl);
|
||||
return 0x00;
|
||||
}
|
||||
|
||||
void
|
||||
plat_cdrom_close(UNUSED(void *local))
|
||||
static uint32_t
|
||||
ioctl_get_last_block(const void *local)
|
||||
{
|
||||
ioctl_t *ioctl = (ioctl_t *) local;
|
||||
|
||||
ioctl_read_toc(ioctl);
|
||||
|
||||
return 0x00000000;
|
||||
}
|
||||
|
||||
int
|
||||
plat_cdrom_set_drive(void *local, const char *drv)
|
||||
static int
|
||||
ioctl_read_dvd_structure(UNUSED(const void *local), UNUSED(const uint8_t layer), UNUSED(const uint8_t format),
|
||||
UNUSED(uint8_t *buffer), UNUSED(uint32_t *info))
|
||||
{
|
||||
dummy_cdrom_ioctl_t *ioctl = (dummy_cdrom_ioctl_t *) local;
|
||||
return -0x00052100;
|
||||
}
|
||||
|
||||
plat_cdrom_close(ioctl);
|
||||
static int
|
||||
ioctl_is_dvd(UNUSED(const void *local))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
ioctl->toc_valid = 0;
|
||||
|
||||
plat_cdrom_load(ioctl);
|
||||
static int
|
||||
ioctl_has_audio(UNUSED(const void *local))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
ioctl_is_empty(const void *local)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
plat_cdrom_get_local_size(void)
|
||||
static int
|
||||
ioctl_ext_medium_changed(UNUSED(void *local))
|
||||
{
|
||||
return sizeof(dummy_cdrom_ioctl_t);
|
||||
#if 0
|
||||
ioctl_t *ioctl = (ioctl_t *) local;
|
||||
#endif
|
||||
int ret = 0;
|
||||
|
||||
ioctl_log("ioctl_ext_medium_changed(): %i\n", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
ioctl_close(void *local)
|
||||
{
|
||||
ioctl_t *ioctl = (ioctl_t *) local;
|
||||
|
||||
ioctl_close_handle(ioctl);
|
||||
ioctl->handle = NULL;
|
||||
|
||||
ioctl_log(ioctl->log, "Log closed\n");
|
||||
|
||||
log_close(ioctl->log);
|
||||
ioctl->log = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
ioctl_load(const void *local)
|
||||
{
|
||||
const ioctl_t *ioctl = (const ioctl_t *) local;
|
||||
|
||||
if (ioctl_open_handle((ioctl_t *) ioctl)) {
|
||||
ioctl_close_handle((ioctl_t *) ioctl);
|
||||
|
||||
ioctl_read_toc((ioctl_t *) ioctl);
|
||||
}
|
||||
}
|
||||
|
||||
static const cdrom_ops_t ioctl_ops = {
|
||||
ioctl_get_track_info,
|
||||
ioctl_get_raw_track_info,
|
||||
ioctl_is_track_pre,
|
||||
ioctl_read_sector,
|
||||
ioctl_get_track_type,
|
||||
ioctl_get_last_block,
|
||||
ioctl_read_dvd_structure,
|
||||
ioctl_is_dvd,
|
||||
ioctl_has_audio,
|
||||
ioctl_is_empty,
|
||||
ioctl_close,
|
||||
ioctl_load
|
||||
};
|
||||
|
||||
/* Public functions. */
|
||||
void *
|
||||
ioctl_open(cdrom_t *dev, const char *drv)
|
||||
{
|
||||
ioctl_t *ioctl = (ioctl_t *) calloc(1, sizeof(ioctl_t));
|
||||
|
||||
if (ioctl != NULL) {
|
||||
char n[1024] = { 0 };
|
||||
|
||||
sprintf(n, "CD-ROM %i IOCtl", dev->id + 1);
|
||||
ioctl->log = log_open(n);
|
||||
|
||||
memset(ioctl->path, 0x00, sizeof(ioctl->path));
|
||||
|
||||
sprintf(ioctl->path, "%s", drv);
|
||||
ioctl_log(ioctl->log, "Path is %s\n", ioctl->path);
|
||||
|
||||
ioctl->dev = dev;
|
||||
|
||||
dev->ops = &ioctl_ops;
|
||||
}
|
||||
|
||||
return ioctl;
|
||||
}
|
||||
|
||||
BIN
src/qt/icons/active.ico
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
src/qt/icons/caps_lock_off.ico
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
src/qt/icons/caps_lock_on.ico
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
BIN
src/qt/icons/disabled.ico
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |