Several little things.
The C version of the GenericLog was being used in both C and C++ branches of the code. Parent panic alerts by the main_frame so that those windows get the icon too. Fix a couple of compiler warnings. Added some checks for libraries in the cmake build. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6385 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
7800d68fee
commit
c0bdf4de81
|
@ -86,10 +86,6 @@ endif(CMAKE_BUILD_TYPE STREQUAL Release)
|
|||
# be needed by users is optional defaulting to ON, other stuff (like e.g.
|
||||
# sound backends) is completely optional.
|
||||
|
||||
# TODO: wxWidgets: When building the Debug configuration, we should probably
|
||||
# check if the debug wx libs are available and fall back to the bundled ones
|
||||
# otherwise.
|
||||
|
||||
include(FindOpenGL REQUIRED)
|
||||
include_directories(${OPENGL_INCLUDE_DIR})
|
||||
|
||||
|
@ -287,6 +283,12 @@ endif()
|
|||
if(WIN32)
|
||||
find_library(GLEW glew32s PATHS Externals/GLew)
|
||||
include_directories(Externals/GLew/include)
|
||||
else()
|
||||
include(CheckLib)
|
||||
check_lib(GLEW glew TRUE)
|
||||
check_lib(GLU glu TRUE)
|
||||
check_lib(CG Cg TRUE)
|
||||
check_lib(CGGL CgGL TRUE)
|
||||
endif()
|
||||
|
||||
if(NOT APPLE)
|
||||
|
@ -305,12 +307,9 @@ if(NOT DISABLE_WX)
|
|||
include(${wxWidgets_USE_FILE})
|
||||
|
||||
if(UNIX)
|
||||
pkg_search_module(GTK2 REQUIRED gtk+-2.0)
|
||||
check_lib(GTK2 gtk+-2.0 TRUE)
|
||||
if(GTK2_FOUND)
|
||||
include_directories(${GTK2_INCLUDE_DIRS})
|
||||
message("GTK 2 found")
|
||||
else(GTK2_FOUND)
|
||||
message("GTK 2 NOT found")
|
||||
endif(GTK2_FOUND)
|
||||
endif(UNIX)
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
macro(check_lib var lib required)
|
||||
pkg_search_module(${var} ${lib})
|
||||
if(${var}_FOUND)
|
||||
message("${lib} found")
|
||||
else()
|
||||
find_library(${var} ${lib})
|
||||
if(${var})
|
||||
message("${lib} found")
|
||||
set(${var}_FOUND 1 CACHE INTERNAL "")
|
||||
else()
|
||||
if(${required})
|
||||
message(FATAL_ERROR "${lib} is required but not found")
|
||||
else()
|
||||
message("${lib} not found")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
|
@ -74,12 +74,12 @@ unsigned int CMixer::Mix(short* samples, unsigned int numSamples)
|
|||
|
||||
s16 l1 = Common::swap16(m_buffer[m_indexR & INDEX_MASK]); //current
|
||||
s16 l2 = Common::swap16(m_buffer[m_indexR2 & INDEX_MASK]); //next
|
||||
int sampleL = (l1 << 16) + (l2 - l1) * (u16)frac >> 16;
|
||||
int sampleL = ((l1 << 16) + (l2 - l1) * (u16)frac) >> 16;
|
||||
samples[i] = sampleL;
|
||||
|
||||
s16 r1 = Common::swap16(m_buffer[(m_indexR + 1) & INDEX_MASK]); //current
|
||||
s16 r2 = Common::swap16(m_buffer[(m_indexR2 + 1) & INDEX_MASK]); //next
|
||||
int sampleR = (r1 << 16) + (r2 - r1) * (u16)frac >> 16;
|
||||
int sampleR = ((r1 << 16) + (r2 - r1) * (u16)frac) >> 16;
|
||||
samples[i+1] = sampleR;
|
||||
|
||||
frac += ratio;
|
||||
|
|
|
@ -95,7 +95,9 @@ extern "C" {
|
|||
#endif
|
||||
void GenericLogC(int level, int type,
|
||||
const char *file, int line, const char *fmt, ...);
|
||||
#ifndef __cplusplus
|
||||
#define GenericLog GenericLogC
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -335,8 +335,8 @@ unsigned int Callback_GetStreaming(short* _pDestBuffer, unsigned int _numSamples
|
|||
r2 = pcm[pos * 2 + 1]; //next
|
||||
}
|
||||
|
||||
pcm_l = (l1 << 16) + (l2 - l1) * (u16)frac >> 16;
|
||||
pcm_r = (l1 << 16) + (l2 - l1) * (u16)frac >> 16;
|
||||
pcm_l = ((l1 << 16) + (l2 - l1) * (u16)frac) >> 16;
|
||||
pcm_r = ((l1 << 16) + (l2 - l1) * (u16)frac) >> 16;
|
||||
|
||||
|
||||
pcm_l = (pcm_l * lvolume >> 8) + (int)(*_pDestBuffer);
|
||||
|
|
|
@ -658,7 +658,7 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
|
|||
#ifdef __WXGTK__
|
||||
case IDM_PANIC:
|
||||
bPanicResult = (wxYES == wxMessageBox(event.GetString(),
|
||||
wxT("Warning"), event.GetInt() ? wxYES_NO : wxOK));
|
||||
wxT("Warning"), event.GetInt() ? wxYES_NO : wxOK), this);
|
||||
panic_event.Set();
|
||||
break;
|
||||
#endif
|
||||
|
|
|
@ -457,7 +457,7 @@ bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int /*Style*
|
|||
#endif
|
||||
return wxYES == wxMessageBox(wxString::FromAscii(text),
|
||||
wxString::FromAscii(caption),
|
||||
(yes_no) ? wxYES_NO : wxOK);
|
||||
(yes_no) ? wxYES_NO : wxOK, main_frame);
|
||||
#ifdef __WXGTK__
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue