mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-19 09:31:26 +00:00
fixed compilation problems on BeOS/ppc
This commit is contained in:
parent
a4b36fd674
commit
73912e732e
@ -21,6 +21,10 @@
|
||||
#ifndef SYSDEPS_H
|
||||
#define SYSDEPS_H
|
||||
|
||||
#ifdef __POWERPC__
|
||||
#define NO_STD_NAMESPACE
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <support/SupportDefs.h>
|
||||
#include <support/ByteOrder.h>
|
||||
@ -69,6 +73,8 @@ typedef off_t loff_t;
|
||||
typedef uae_u32 uaecptr;
|
||||
#define VAL64(a) (a ## LL)
|
||||
#define UVAL64(a) (a ## uLL)
|
||||
typedef uint32 uintptr;
|
||||
typedef int32 intptr;
|
||||
|
||||
// UAE CPU defines
|
||||
#ifdef __i386__
|
||||
|
@ -939,13 +939,13 @@ void MacScreen::ScreenConnected(bool active)
|
||||
|
||||
// Copy from backup store to frame buffer
|
||||
if (frame_backup != NULL) {
|
||||
memcpy(info->frame_buffer, frame_backup, VideoMonitor.bytes_per_row * VideoMonitor.mode.y);
|
||||
memcpy(info->frame_buffer, frame_backup, VideoMonitor.mode.bytes_per_row * VideoMonitor.mode.y);
|
||||
delete[] frame_backup;
|
||||
frame_backup = NULL;
|
||||
}
|
||||
|
||||
// Restore palette
|
||||
if (VideoMonitor.depth == VDEPTH_8BIT)
|
||||
if (VideoMonitor.mode.depth == VDEPTH_8BIT)
|
||||
SetColorList(palette);
|
||||
|
||||
// Restart/signal emulator thread
|
||||
|
@ -23,6 +23,10 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#ifndef NO_STD_NAMESPACE
|
||||
using std::vector;
|
||||
#endif
|
||||
|
||||
/*
|
||||
Some of the terminology here is completely frelled. In Basilisk II, a
|
||||
"video mode" refers to a combination of resolution and color depth, and
|
||||
@ -95,6 +99,7 @@ inline uint32 TrivialBytesPerRow(uint32 width, video_depth depth)
|
||||
case VDEPTH_8BIT: return width;
|
||||
case VDEPTH_16BIT: return width * 2;
|
||||
case VDEPTH_32BIT: return width * 4;
|
||||
default: return width;
|
||||
}
|
||||
}
|
||||
|
||||
@ -141,7 +146,7 @@ inline bool IsDirectMode(const video_mode &mode)
|
||||
}
|
||||
|
||||
// List of all supported video modes
|
||||
extern std::vector<video_mode> VideoModes;
|
||||
extern vector<video_mode> VideoModes;
|
||||
|
||||
// Description for one (possibly virtual) monitor
|
||||
struct monitor_desc {
|
||||
|
@ -49,7 +49,7 @@ static int slot_rom_size = 0;
|
||||
// Check whether a mode with the specified depth exists
|
||||
static bool has_depth(video_depth depth)
|
||||
{
|
||||
std::vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
|
||||
vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
|
||||
while (i != end) {
|
||||
if (i->depth == depth)
|
||||
return true;
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
|
||||
// List of supported video modes
|
||||
std::vector<video_mode> VideoModes;
|
||||
vector<video_mode> VideoModes;
|
||||
|
||||
// Description of the main monitor
|
||||
monitor_desc VideoMonitor;
|
||||
@ -67,7 +67,7 @@ struct {
|
||||
|
||||
static bool has_resolution(uint32 id)
|
||||
{
|
||||
std::vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
|
||||
vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
|
||||
while (i != end) {
|
||||
if (i->resolution_id == id)
|
||||
return true;
|
||||
@ -81,9 +81,9 @@ static bool has_resolution(uint32 id)
|
||||
* Find specified mode (depth/resolution) (or VideoModes.end() if not found)
|
||||
*/
|
||||
|
||||
static std::vector<video_mode>::const_iterator find_mode(uint16 mode, uint32 id)
|
||||
static vector<video_mode>::const_iterator find_mode(uint16 mode, uint32 id)
|
||||
{
|
||||
std::vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
|
||||
vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
|
||||
while (i != end) {
|
||||
if (i->resolution_id == id && DepthToAppleMode(i->depth) == mode)
|
||||
return i;
|
||||
@ -100,7 +100,7 @@ static std::vector<video_mode>::const_iterator find_mode(uint16 mode, uint32 id)
|
||||
static video_depth max_depth_of_resolution(uint32 id)
|
||||
{
|
||||
video_depth m = VDEPTH_1BIT;
|
||||
std::vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
|
||||
vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
|
||||
while (i != end) {
|
||||
if (i->depth > m)
|
||||
m = i->depth;
|
||||
@ -116,7 +116,7 @@ static video_depth max_depth_of_resolution(uint32 id)
|
||||
|
||||
static void get_size_of_resolution(uint32 id, uint32 &x, uint32 &y)
|
||||
{
|
||||
std::vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
|
||||
vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
|
||||
while (i != end) {
|
||||
if (i->resolution_id == id) {
|
||||
x = i->x;
|
||||
@ -335,7 +335,7 @@ int16 VideoDriverControl(uint32 pb, uint32 dce)
|
||||
return paramErr;
|
||||
|
||||
if (mode != VidLocal.current_mode) {
|
||||
std::vector<video_mode>::const_iterator i = find_mode(mode, VidLocal.current_id);
|
||||
vector<video_mode>::const_iterator i = find_mode(mode, VidLocal.current_id);
|
||||
if (i == VideoModes.end())
|
||||
return paramErr;
|
||||
set_gray_palette();
|
||||
@ -494,7 +494,7 @@ int16 VideoDriverControl(uint32 pb, uint32 dce)
|
||||
return paramErr;
|
||||
|
||||
if (mode != VidLocal.current_mode || id != VidLocal.current_id) {
|
||||
std::vector<video_mode>::const_iterator i = find_mode(mode, id);
|
||||
vector<video_mode>::const_iterator i = find_mode(mode, id);
|
||||
if (i == VideoModes.end())
|
||||
return paramErr;
|
||||
set_gray_palette();
|
||||
@ -751,7 +751,7 @@ int16 VideoDriverStatus(uint32 pb, uint32 dce)
|
||||
uint16 mode = ReadMacInt16(param + csDepthMode);
|
||||
D(bug(" GetVideoParameters %04x/%08x\n", mode, id));
|
||||
|
||||
std::vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
|
||||
vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
|
||||
while (i != end) {
|
||||
if (DepthToAppleMode(i->depth) == mode && i->resolution_id == id) {
|
||||
uint32 vp = ReadMacInt32(param + csVPBlockPtr);
|
||||
|
Loading…
Reference in New Issue
Block a user