Use .cpp suffix when detecting libraries. On some systems, g++

is required to correctly link with C++ libraries like wxw.

Tell OS X that the user is doing something when using the wiimote
so that the screensaver doesn't come on when playing a Wii game.

Replace unnecessary floating point with integer math.

Remove unnecessary <sys/stat.h>'s.

Correct a few type nits.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5995 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang 2010-07-29 13:29:15 +00:00
parent 9ff5e836eb
commit 24fdf942a4
14 changed files with 20 additions and 23 deletions

View File

@ -31,6 +31,7 @@
* @brief Handles device I/O for OS X.
*/
#import <CoreServices/CoreServices.h>
#define BLUETOOTH_VERSION_USE_CURRENT
#import <IOBluetooth/objc/IOBluetoothDevice.h>
#import <IOBluetooth/objc/IOBluetoothDeviceInquiry.h>
@ -113,6 +114,8 @@ volatile int reader, writer, outstanding, watermark;
}
CFRunLoopStop(CFRunLoopGetCurrent());
UpdateSystemActivity(UsrActivity);
}
- (void) l2capChannelClosed: (IOBluetoothL2CAPChannel *) l2capChannel

View File

@ -17,7 +17,7 @@ def CheckLib(context, name):
int main(int argc, char **argv) {
return 0;
}
\n""", '.c')
\n""", '.cpp')
if not ret:
context.env.Replace(LIBS = lastLIBS)
@ -72,7 +72,7 @@ def CheckPortaudio(context, version):
printf("%d", Pa_GetVersion());
return 0;
}
\n""", '.c')[1]
\n""", '.cpp')[1]
if found:
ret = (version <= found)

View File

@ -7,7 +7,6 @@
#
import os, os.path
import re
import sys
import glob
import string

View File

@ -22,7 +22,6 @@
#ifdef _WIN32
#include <windows.h>
#else
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <cerrno>

View File

@ -47,8 +47,7 @@ SCoreStartupParameter::SCoreStartupParameter()
bLockThreads(false),
bEnableCheats(false),
bRunCompareServer(false), bRunCompareClient(false),
iTLBHack(0), SelectedLanguage(0),
bWii(false), bMMU(false),
bMMU(false), iTLBHack(0), SelectedLanguage(0), bWii(false),
bConfirmStop(false), bHideCursor(false),
bAutoHideCursor(false), bUsePanicHandlers(true),
iRenderWindowXPos(0), iRenderWindowYPos(0),
@ -70,10 +69,10 @@ void SCoreStartupParameter::LoadDefaults()
bDSPThread = true;
bLockThreads = true;
bEnableFPRF = false;
bWii = false;
SelectedLanguage = 0;
bMMU = false;
iTLBHack = 0;
SelectedLanguage = 0;
bWii = false;
iPosX = 100;
iPosY = 100;

View File

@ -423,7 +423,7 @@ u32 Read_Opcode_JIT(u32 _Address)
#ifdef FAST_ICACHE
if (bMMU && !bFakeVMEM && (_Address >> 28) == 0x7)
{
_Address = Memory::TranslateAddress(_Address, Memory::XCheckTLBFlag::FLAG_OPCODE);
_Address = Memory::TranslateAddress(_Address, FLAG_OPCODE);
if (_Address == 0)
{
return 0;

View File

@ -327,7 +327,7 @@ u32 Read_Opcode(u32 _Address)
if (Core::g_CoreStartupParameter.bMMU && (_Address >> 28) == 0x7)
{
// TODO: Check for MSR instruction address translation flag before translating
u32 tlb_addr = Memory::TranslateAddress(_Address, Memory::XCheckTLBFlag::FLAG_OPCODE);
u32 tlb_addr = Memory::TranslateAddress(_Address, FLAG_OPCODE);
if (tlb_addr == 0)
{
GenerateISIException(_Address);
@ -692,7 +692,7 @@ u32 LookupTLBPageAddress(const XCheckTLBFlag _Flag, const u32 vpa, u32 *paddr)
u32 _Address = vpa;
if (_Flag == FLAG_OPCODE)
{
for (int i = (PowerPC::ppcState.itlb_last); i > (PowerPC::ppcState.itlb_last - 128); i--)
for (u32 i = (PowerPC::ppcState.itlb_last); i > (PowerPC::ppcState.itlb_last - 128); i--)
{
if ((_Address & ~0xfff) == (PowerPC::ppcState.itlb_va[i & 127]))
{
@ -705,7 +705,7 @@ u32 LookupTLBPageAddress(const XCheckTLBFlag _Flag, const u32 vpa, u32 *paddr)
}
else
{
for (int i = (PowerPC::ppcState.dtlb_last); i > (PowerPC::ppcState.dtlb_last - 128); i--)
for (u32 i = (PowerPC::ppcState.dtlb_last); i > (PowerPC::ppcState.dtlb_last - 128); i--)
{
if ((_Address & ~0xfff) == (PowerPC::ppcState.dtlb_va[i & 127]))
{

View File

@ -430,7 +430,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
if (Core::g_CoreStartupParameter.bMMU && (em_address >> 28) == 0x7)
{
if (!Memory::TranslateAddress(em_address, Memory::XCheckTLBFlag::FLAG_OPCODE))
if (!Memory::TranslateAddress(em_address, Memory::FLAG_OPCODE))
{
// Memory exception occurred during instruction fetch
memory_exception = true;

View File

@ -372,8 +372,8 @@ CFrame::CFrame(wxFrame* parent,
// Create timer
#if wxUSE_TIMER
int TimesPerSecond = 10; // We don't need more than this
m_timer.Start( floor((double)(1000 / TimesPerSecond)) );
const int TimesPerSecond = 10; // We don't need more than this
m_timer.Start(1000 / TimesPerSecond);
#endif
// Create toolbar bitmaps

View File

@ -1278,10 +1278,10 @@ void CGameListCtrl::AutomaticColumnWidth()
+ 5); // some pad to keep the horizontal scrollbar away :)
// We hide the Company column if the window is too small
if (0.5*resizable > 200)
if (resizable / 2 > 200)
{
SetColumnWidth(COLUMN_TITLE, 0.5*resizable);
SetColumnWidth(COLUMN_NOTES, 0.5*resizable);
SetColumnWidth(COLUMN_TITLE, resizable / 2);
SetColumnWidth(COLUMN_NOTES, resizable / 2);
}
else
{

View File

@ -123,8 +123,8 @@ void HotkeyConfigDialog::SetButtonText(int id, const wxString &keystr, const wxS
void HotkeyConfigDialog::DoGetButtons(int _GetId)
{
// Values used in this function
int Seconds = 4; // Seconds to wait for
int TimesPerSecond = 40; // How often to run the check
const int Seconds = 4; // Seconds to wait for
const int TimesPerSecond = 40; // How often to run the check
// If the Id has changed or the timer is not running we should start one
if( GetButtonWaitingID != _GetId || !m_ButtonMappingTimer->IsRunning() )

View File

@ -26,7 +26,6 @@
#include <string.h>
#include <math.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string>
//#define DEBUG_OPENCL

View File

@ -67,7 +67,6 @@
#ifndef _WIN32
#include <sys/stat.h>
#include <sys/types.h>
typedef struct {

View File

@ -66,7 +66,6 @@
#ifndef _WIN32
#include <sys/stat.h>
#include <sys/types.h>
typedef struct {