mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-22 05:45:38 +00:00
fix basic compile errors (with vs)
This commit is contained in:
parent
09747bcd7c
commit
5b3eea25fb
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include <cstdio>
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
|
||||
#define RAM_SIZE 0x2000 // Z80 RAM
|
||||
|
||||
|
@ -456,13 +457,13 @@ void CDriveBoard::EmulateFrame(void)
|
|||
{
|
||||
// Assuming Z80 runs @ 4.0MHz and NMI triggers @ 60.0KHz
|
||||
// TODO - find out if Z80 frequency is correct and exact frequency of NMI interrupts (just guesswork at the moment!)
|
||||
int cycles = 4.0 * 1000000 / 60;
|
||||
int cycles = (int)(4.0 * 1000000 / 60);
|
||||
int loopCycles = 10000;
|
||||
while (cycles > 0)
|
||||
{
|
||||
if (m_allowInterrupts)
|
||||
m_z80.TriggerNMI();
|
||||
cycles -= m_z80.Run(min<int>(loopCycles, cycles));
|
||||
cycles -= m_z80.Run(std::min<int>(loopCycles, cycles));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#endif
|
||||
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
|
||||
// Model3 audio output is 44.1KHz 2-channel sound and frame rate is 60fps
|
||||
#define SAMPLE_RATE 44100
|
||||
|
@ -256,7 +257,7 @@ bool OpenAudio()
|
|||
// Create audio buffer
|
||||
audioBufferSize = SAMPLE_RATE * BYTES_PER_SAMPLE * latency / MAX_LATENCY;
|
||||
int minBufferSize = 3 * BYTES_PER_FRAME;
|
||||
audioBufferSize = max<int>(minBufferSize, audioBufferSize);
|
||||
audioBufferSize = std::max<int>(minBufferSize, audioBufferSize);
|
||||
audioBuffer = new(std::nothrow) INT8[audioBufferSize];
|
||||
if (audioBuffer == NULL)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue