fix osx compile (nw)

This commit is contained in:
Miodrag Milanovic 2016-07-31 15:22:24 +02:00
parent ac36da95aa
commit 2a87e99b21
4 changed files with 6 additions and 6 deletions

View File

@ -583,7 +583,7 @@ static void debugwin_view_update(debug_view &view, void *osdprivate)
if (wholeLineScroll)
{
CGFloat const clamp = [self bounds].size.height - fontHeight - proposedVisibleRect.size.height;
proposedVisibleRect.origin.y = std::min(proposedVisibleRect.origin.y, std::max(clamp, 0));
proposedVisibleRect.origin.y = std::min((int)proposedVisibleRect.origin.y, std::max((int)clamp, 0));
proposedVisibleRect.origin.y -= fmod(proposedVisibleRect.origin.y, fontHeight);
}
return proposedVisibleRect;
@ -668,7 +668,7 @@ static void debugwin_view_update(debug_view &view, void *osdprivate)
inTextContainer:textContainer];
if (start == 0)
box.origin.x = 0;
box.size.width = std::max([self bounds].size.width - box.origin.x, 0);
box.size.width = std::max((int)([self bounds].size.width - box.origin.x), 0);
[[self backgroundForAttribute:attr] set];
[NSBezierPath fillRect:NSMakeRect(box.origin.x,
row * fontHeight,

View File

@ -350,7 +350,7 @@ NSString *const MAMEAuxiliaryDebugWindowWillCloseNotification = @"MAMEAuxiliaryD
windowFrame.size.height = std::min(windowFrame.size.height, available.size.height);
// arbitrary additional height limit
windowFrame.size.height = std::min(windowFrame.size.height, 320);
windowFrame.size.height = std::min((int)windowFrame.size.height, 320);
// place it in the bottom right corner and apply
windowFrame.origin.x = available.origin.x + available.size.width - windowFrame.size.width;

View File

@ -44,7 +44,7 @@
borderType:[logScroll borderType]];
// this thing starts with no content, so its prefered height may be very small
desired.height = std::max(desired.height, 240);
desired.height = std::max((int)desired.height, 240);
[self cascadeWindowWithDesiredSize:desired forView:logScroll];
}

View File

@ -81,7 +81,7 @@ private:
EFFECT_COUNT_MAX = 10
};
UINT32 clamped_latency() const { return std::max(std::min(m_audio_latency, LATENCY_MAX), LATENCY_MIN); }
UINT32 clamped_latency() const { return std::max(std::min(UINT32(m_audio_latency), UINT32(LATENCY_MAX)), UINT32(LATENCY_MIN)); }
UINT32 buffer_avail() const { return ((m_writepos >= m_playpos) ? m_buffer_size : 0) + m_playpos - m_writepos; }
UINT32 buffer_used() const { return ((m_playpos > m_writepos) ? m_buffer_size : 0) + m_writepos - m_playpos; }
@ -228,7 +228,7 @@ int sound_coreaudio::init(const osd_options &options)
// Allocate buffer
m_headroom = m_sample_bytes * (clamped_latency() * sample_rate() / 40);
m_buffer_size = m_sample_bytes * std::max(sample_rate() * (clamped_latency() + 3) / 40, 256);
m_buffer_size = m_sample_bytes * std::max(UINT32(sample_rate() * (clamped_latency() + 3) / 40), 256U);
m_buffer = global_alloc_array_clear<INT8>(m_buffer_size);
if (!m_buffer)
{