mirror of https://github.com/PCSX2/pcsx2.git
pcsx2: linux: take some margins for the height of font (avoid top/bottom cut)
cmake: * disable fomit-frame-pointer which cause crash with gcc-4.6 (it was not enabled by default but now I'm sure people will not enable it ;) ) * Try harder to pick the 32bits configuration for wx in a 64bits environment (opensuse/fedora). git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4641 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
96b2d810c1
commit
827dcfaf6f
|
@ -168,8 +168,16 @@ if(wxWidgets_FOUND)
|
||||||
# Force the use of 32 bit library configuration on
|
# Force the use of 32 bit library configuration on
|
||||||
# 64 bits machine with 32 bits library in /usr/lib32
|
# 64 bits machine with 32 bits library in /usr/lib32
|
||||||
if(CMAKE_SIZEOF_VOID_P MATCHES "8" AND EXISTS "/usr/lib32")
|
if(CMAKE_SIZEOF_VOID_P MATCHES "8" AND EXISTS "/usr/lib32")
|
||||||
STRING(REGEX REPLACE "/usr/lib/wx" "/usr/lib32/wx"
|
if (EXISTS "/usr/lib32")
|
||||||
wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}")
|
# Debian/ubuntu. 64b in /usr/lib and 32b in /usr/lib32
|
||||||
|
STRING(REGEX REPLACE "/usr/lib/wx" "/usr/lib32/wx" wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}")
|
||||||
|
# I'm sure someone did it! 64b in /usr/lib64 and 32b in /usr/lib32
|
||||||
|
STRING(REGEX REPLACE "/usr/lib64/wx" "/usr/lib32/wx" wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}")
|
||||||
|
endif (EXISTS "/usr/lib32")
|
||||||
|
if (EXISTS "/usr/lib")
|
||||||
|
# Fedora/Open suse. 64b in /usr/lib64 and 32b in /usr/lib
|
||||||
|
STRING(REGEX REPLACE "/usr/lib64/wx" "/usr/lib/wx" wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}")
|
||||||
|
endif (EXISTS "/usr/lib")
|
||||||
endif(CMAKE_SIZEOF_VOID_P MATCHES "8" AND EXISTS "/usr/lib32")
|
endif(CMAKE_SIZEOF_VOID_P MATCHES "8" AND EXISTS "/usr/lib32")
|
||||||
endif(Linux)
|
endif(Linux)
|
||||||
|
|
||||||
|
|
|
@ -474,7 +474,13 @@ int pxGetCharHeight( const wxWindow* wind, int rows )
|
||||||
if( !wind ) return 0;
|
if( !wind ) return 0;
|
||||||
wxClientDC dc(wx_const_cast(wxWindow*, wind));
|
wxClientDC dc(wx_const_cast(wxWindow*, wind));
|
||||||
dc.SetFont( wind->GetFont() );
|
dc.SetFont( wind->GetFont() );
|
||||||
|
#ifdef __LINUX__
|
||||||
|
// It seems there is a bad detection of the size of the font (non standard dpi ???). Font are cut in top or bottom.
|
||||||
|
// Add a correction factor to leave enough room. Visualy 1.7 seems fine but feel free to tune it -- Gregory
|
||||||
|
return (dc.GetCharHeight() * 1.7 + 1 ) * rows;
|
||||||
|
#else
|
||||||
return (dc.GetCharHeight() + 1 ) * rows;
|
return (dc.GetCharHeight() + 1 ) * rows;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int pxGetCharHeight( const wxWindow& wind, int rows )
|
int pxGetCharHeight( const wxWindow& wind, int rows )
|
||||||
|
|
|
@ -8,6 +8,10 @@ endif(NOT TOP_CMAKE_WAS_SOURCED)
|
||||||
|
|
||||||
# set common flags
|
# set common flags
|
||||||
set(CommonFlags
|
set(CommonFlags
|
||||||
|
# GCC-4.6 crash pcsx2 during the binding of plugins at startup...
|
||||||
|
# Disable this optimization for the moment
|
||||||
|
-fno-omit-frame-pointer
|
||||||
|
# END GCC-4.6
|
||||||
-DLINUX_PRINT_SVN_NUMBER
|
-DLINUX_PRINT_SVN_NUMBER
|
||||||
-pthread
|
-pthread
|
||||||
-fvisibility=hidden
|
-fvisibility=hidden
|
||||||
|
|
Loading…
Reference in New Issue