mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-16 09:19:23 +01:00
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:
parent
9ff5e836eb
commit
24fdf942a4
3
Externals/WiiUse/Src/io_osx.m
vendored
3
Externals/WiiUse/Src/io_osx.m
vendored
@ -31,6 +31,7 @@
|
|||||||
* @brief Handles device I/O for OS X.
|
* @brief Handles device I/O for OS X.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#import <CoreServices/CoreServices.h>
|
||||||
#define BLUETOOTH_VERSION_USE_CURRENT
|
#define BLUETOOTH_VERSION_USE_CURRENT
|
||||||
#import <IOBluetooth/objc/IOBluetoothDevice.h>
|
#import <IOBluetooth/objc/IOBluetoothDevice.h>
|
||||||
#import <IOBluetooth/objc/IOBluetoothDeviceInquiry.h>
|
#import <IOBluetooth/objc/IOBluetoothDeviceInquiry.h>
|
||||||
@ -113,6 +114,8 @@ volatile int reader, writer, outstanding, watermark;
|
|||||||
}
|
}
|
||||||
|
|
||||||
CFRunLoopStop(CFRunLoopGetCurrent());
|
CFRunLoopStop(CFRunLoopGetCurrent());
|
||||||
|
|
||||||
|
UpdateSystemActivity(UsrActivity);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) l2capChannelClosed: (IOBluetoothL2CAPChannel *) l2capChannel
|
- (void) l2capChannelClosed: (IOBluetoothL2CAPChannel *) l2capChannel
|
||||||
|
@ -17,7 +17,7 @@ def CheckLib(context, name):
|
|||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
\n""", '.c')
|
\n""", '.cpp')
|
||||||
if not ret:
|
if not ret:
|
||||||
context.env.Replace(LIBS = lastLIBS)
|
context.env.Replace(LIBS = lastLIBS)
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ def CheckPortaudio(context, version):
|
|||||||
printf("%d", Pa_GetVersion());
|
printf("%d", Pa_GetVersion());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
\n""", '.c')[1]
|
\n""", '.cpp')[1]
|
||||||
|
|
||||||
if found:
|
if found:
|
||||||
ret = (version <= found)
|
ret = (version <= found)
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
#
|
#
|
||||||
import os, os.path
|
import os, os.path
|
||||||
import re
|
import re
|
||||||
import sys
|
|
||||||
import glob
|
import glob
|
||||||
import string
|
import string
|
||||||
|
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#else
|
#else
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
|
@ -47,8 +47,7 @@ SCoreStartupParameter::SCoreStartupParameter()
|
|||||||
bLockThreads(false),
|
bLockThreads(false),
|
||||||
bEnableCheats(false),
|
bEnableCheats(false),
|
||||||
bRunCompareServer(false), bRunCompareClient(false),
|
bRunCompareServer(false), bRunCompareClient(false),
|
||||||
iTLBHack(0), SelectedLanguage(0),
|
bMMU(false), iTLBHack(0), SelectedLanguage(0), bWii(false),
|
||||||
bWii(false), bMMU(false),
|
|
||||||
bConfirmStop(false), bHideCursor(false),
|
bConfirmStop(false), bHideCursor(false),
|
||||||
bAutoHideCursor(false), bUsePanicHandlers(true),
|
bAutoHideCursor(false), bUsePanicHandlers(true),
|
||||||
iRenderWindowXPos(0), iRenderWindowYPos(0),
|
iRenderWindowXPos(0), iRenderWindowYPos(0),
|
||||||
@ -70,10 +69,10 @@ void SCoreStartupParameter::LoadDefaults()
|
|||||||
bDSPThread = true;
|
bDSPThread = true;
|
||||||
bLockThreads = true;
|
bLockThreads = true;
|
||||||
bEnableFPRF = false;
|
bEnableFPRF = false;
|
||||||
bWii = false;
|
|
||||||
SelectedLanguage = 0;
|
|
||||||
bMMU = false;
|
bMMU = false;
|
||||||
iTLBHack = 0;
|
iTLBHack = 0;
|
||||||
|
SelectedLanguage = 0;
|
||||||
|
bWii = false;
|
||||||
|
|
||||||
iPosX = 100;
|
iPosX = 100;
|
||||||
iPosY = 100;
|
iPosY = 100;
|
||||||
|
@ -423,7 +423,7 @@ u32 Read_Opcode_JIT(u32 _Address)
|
|||||||
#ifdef FAST_ICACHE
|
#ifdef FAST_ICACHE
|
||||||
if (bMMU && !bFakeVMEM && (_Address >> 28) == 0x7)
|
if (bMMU && !bFakeVMEM && (_Address >> 28) == 0x7)
|
||||||
{
|
{
|
||||||
_Address = Memory::TranslateAddress(_Address, Memory::XCheckTLBFlag::FLAG_OPCODE);
|
_Address = Memory::TranslateAddress(_Address, FLAG_OPCODE);
|
||||||
if (_Address == 0)
|
if (_Address == 0)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -327,7 +327,7 @@ u32 Read_Opcode(u32 _Address)
|
|||||||
if (Core::g_CoreStartupParameter.bMMU && (_Address >> 28) == 0x7)
|
if (Core::g_CoreStartupParameter.bMMU && (_Address >> 28) == 0x7)
|
||||||
{
|
{
|
||||||
// TODO: Check for MSR instruction address translation flag before translating
|
// 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)
|
if (tlb_addr == 0)
|
||||||
{
|
{
|
||||||
GenerateISIException(_Address);
|
GenerateISIException(_Address);
|
||||||
@ -692,7 +692,7 @@ u32 LookupTLBPageAddress(const XCheckTLBFlag _Flag, const u32 vpa, u32 *paddr)
|
|||||||
u32 _Address = vpa;
|
u32 _Address = vpa;
|
||||||
if (_Flag == FLAG_OPCODE)
|
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]))
|
if ((_Address & ~0xfff) == (PowerPC::ppcState.itlb_va[i & 127]))
|
||||||
{
|
{
|
||||||
@ -705,7 +705,7 @@ u32 LookupTLBPageAddress(const XCheckTLBFlag _Flag, const u32 vpa, u32 *paddr)
|
|||||||
}
|
}
|
||||||
else
|
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]))
|
if ((_Address & ~0xfff) == (PowerPC::ppcState.dtlb_va[i & 127]))
|
||||||
{
|
{
|
||||||
|
@ -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 (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 occurred during instruction fetch
|
||||||
memory_exception = true;
|
memory_exception = true;
|
||||||
|
@ -372,8 +372,8 @@ CFrame::CFrame(wxFrame* parent,
|
|||||||
|
|
||||||
// Create timer
|
// Create timer
|
||||||
#if wxUSE_TIMER
|
#if wxUSE_TIMER
|
||||||
int TimesPerSecond = 10; // We don't need more than this
|
const int TimesPerSecond = 10; // We don't need more than this
|
||||||
m_timer.Start( floor((double)(1000 / TimesPerSecond)) );
|
m_timer.Start(1000 / TimesPerSecond);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Create toolbar bitmaps
|
// Create toolbar bitmaps
|
||||||
|
@ -1278,10 +1278,10 @@ void CGameListCtrl::AutomaticColumnWidth()
|
|||||||
+ 5); // some pad to keep the horizontal scrollbar away :)
|
+ 5); // some pad to keep the horizontal scrollbar away :)
|
||||||
|
|
||||||
// We hide the Company column if the window is too small
|
// 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_TITLE, resizable / 2);
|
||||||
SetColumnWidth(COLUMN_NOTES, 0.5*resizable);
|
SetColumnWidth(COLUMN_NOTES, resizable / 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -123,8 +123,8 @@ void HotkeyConfigDialog::SetButtonText(int id, const wxString &keystr, const wxS
|
|||||||
void HotkeyConfigDialog::DoGetButtons(int _GetId)
|
void HotkeyConfigDialog::DoGetButtons(int _GetId)
|
||||||
{
|
{
|
||||||
// Values used in this function
|
// Values used in this function
|
||||||
int Seconds = 4; // Seconds to wait for
|
const int Seconds = 4; // Seconds to wait for
|
||||||
int TimesPerSecond = 40; // How often to run the check
|
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 the Id has changed or the timer is not running we should start one
|
||||||
if( GetButtonWaitingID != _GetId || !m_ButtonMappingTimer->IsRunning() )
|
if( GetButtonWaitingID != _GetId || !m_ButtonMappingTimer->IsRunning() )
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
//#define DEBUG_OPENCL
|
//#define DEBUG_OPENCL
|
||||||
|
@ -67,7 +67,6 @@
|
|||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -66,7 +66,6 @@
|
|||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user