diff --git a/include/iglib.h b/include/iglib.h index d799a59be..7d2a2d478 100644 --- a/include/iglib.h +++ b/include/iglib.h @@ -59,6 +59,9 @@ extern uint16_t DOSBOXID_VAR dosbox_id_baseio; #define DOSBOX_ID_REG_VERSION_STRING (0x00000002UL) #define DOSBOX_ID_REG_VERSION_NUMBER (0x00000003UL) #define DOSBOX_ID_REG_READ_EMTIME (0x00000004UL) +#define DOSBOX_ID_REG_DOSBOX_VERSION_MAJOR (0x00000005UL) +#define DOSBOX_ID_REG_DOSBOX_VERSION_MINOR (0x00000006UL) +#define DOSBOX_ID_REG_DOSBOX_VERSION_SUB (0x00000007UL) #define DOSBOX_ID_REG_DEBUG_OUT (0x0000DEB0UL) #define DOSBOX_ID_REG_DEBUG_CLEAR (0x0000DEB1UL) diff --git a/src/ints/bios.cpp b/src/ints/bios.cpp index 6ca8bc829..7f36101e1 100644 --- a/src/ints/bios.cpp +++ b/src/ints/bios.cpp @@ -718,19 +718,19 @@ void dosbox_integration_trigger_read() { case DOSBOX_ID_REG_READ_EMTIME: /* current emulator time as 16.16 fixed point */ dosbox_int_register = (uint32_t)(PIC_FullIndex() * 0x10000); break; - case 5: // DOSBox-X version number major (e.g. 2022) + case DOSBOX_ID_REG_DOSBOX_VERSION_MAJOR: // DOSBox-X version number major (e.g. 2022) { const char * ver = strchr(VERSION, '.'); dosbox_int_register = ver == NULL ? 0 : atoi(std::string(VERSION).substr(0, strlen(ver) - strlen(VERSION)).c_str()); break; } - case 6: // DOSBox-X version number minor (e.g. 8) + case DOSBOX_ID_REG_DOSBOX_VERSION_MINOR: // DOSBox-X version number minor (e.g. 8) { const char * ver = strchr(VERSION, '.'); dosbox_int_register = ver == NULL ? 0 : atoi(ver + 1); break; } - case 7: // DOSBox-X version number sub (e.g. 0) + case DOSBOX_ID_REG_DOSBOX_VERSION_SUB: // DOSBox-X version number sub (e.g. 0) { const char * ver = strchr(VERSION, '.'); ver = strchr(ver + 1, '.');