mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-01-22 14:17:03 +00:00
Cumulative changes required to enable / ease compilation in Linux with gcc. (PR #861)
Split MouseInterface to isolate DirectInput code. Avoid overflow in platforms where RAND_MAX is a big integer constant. Fix include files for gcc (where enums cannot be forward declared).
This commit is contained in:
@@ -37,6 +37,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#include "DiskImage.h"
|
||||
#include "DiskImageHelper.h"
|
||||
#include "Log.h"
|
||||
#include "Card.h"
|
||||
#include "Memory.h"
|
||||
|
||||
ImageInfo::ImageInfo()
|
||||
@@ -1089,7 +1090,7 @@ public:
|
||||
BYTE n = 0;
|
||||
for (UINT j = 0; j < 8; j++)
|
||||
{
|
||||
if (rand() < ((RAND_MAX * 3) / 10)) // ~30% of buffer are 1 bits
|
||||
if (rand() < RAND_THRESHOLD(3, 10)) // ~30% of buffer are 1 bits
|
||||
n |= 1 << j;
|
||||
}
|
||||
m_pWOZEmptyTrack[i] = n;
|
||||
|
||||
Reference in New Issue
Block a user