Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
jsm174 committed Jun 28, 2024
1 parent d51a489 commit cb9dce5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/altsound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,35 +55,35 @@ void altsound_preprocess_commands(int cmd)
for (int i = 0; i < ALT_MAX_CMDS; ++i)
g_cmdData.cmd_buffer[i] = ~0;

*g_cmdData.cmd_counter = 0;
*g_cmdData.cmd_filter = 1;
g_cmdData.cmd_counter = 0;
g_cmdData.cmd_filter = 1;
}
else
if ((g_cmdData.cmd_buffer[3] == 0x55) && (g_cmdData.cmd_buffer[2] == 0xC2)) // DCS software major version number
{
for (int i = 0; i < ALT_MAX_CMDS; ++i)
g_cmdData.cmd_buffer[i] = ~0;

*g_cmdData.cmd_counter = 0;
*g_cmdData.cmd_filter = 1;
g_cmdData.cmd_counter = 0;
g_cmdData.cmd_filter = 1;
}
else
if ((g_cmdData.cmd_buffer[3] == 0x55) && (g_cmdData.cmd_buffer[2] == 0xC3)) // DCS software minor version number
{
for (int i = 0; i < ALT_MAX_CMDS; ++i)
g_cmdData.cmd_buffer[i] = ~0;

*g_cmdData.cmd_counter = 0;
*g_cmdData.cmd_filter = 1;
g_cmdData.cmd_counter = 0;
g_cmdData.cmd_filter = 1;
}
else
if ((g_cmdData.cmd_buffer[3] == 0x55) && (g_cmdData.cmd_buffer[2] >= 0xBA) && (g_cmdData.cmd_buffer[2] <= 0xC1) && (g_cmdData.cmd_buffer[1] == (g_cmdData.cmd_buffer[0] ^ 0xFF))) // mystery command, see http://mjrnet.org/pinscape/dcsref/DCS_format_reference.html#SpecialCommands
{
for (int i = 0; i < ALT_MAX_CMDS; ++i)
g_cmdData.cmd_buffer[i] = ~0;

*g_cmdData.cmd_counter = 0;
*g_cmdData.cmd_filter = 1;
g_cmdData.cmd_counter = 0;
g_cmdData.cmd_filter = 1;
}
else
if (((g_cmdData.cmd_buffer[3] == 0x55) && (g_cmdData.cmd_buffer[2] == 0xAA))) { // change master volume?
Expand Down
1 change: 1 addition & 0 deletions src/altsound_processor_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include <iomanip>
#include <chrono>
#include <cfloat>

extern AltsoundLogger alog;
extern StreamArray channel_stream;
Expand Down

2 comments on commit cb9dce5

@toxieainc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsm174 Thanks a lot!!

@jsm174
Copy link
Collaborator Author

@jsm174 jsm174 commented on cb9dce5 Jun 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@toxieainc - np! thank you for carrying these changes over!

Please sign in to comment.