Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorDaniel Genrich <daniel.genrich@gmx.net>2008-07-11 18:44:20 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2008-07-11 18:44:20 +0400
commitc83e32fc339c6b768e0568a9f85097418a427e2b (patch)
treea687b055413eb8acf86487c2558ec35cdf175b87 /intern
parent3bab1eba3a6c1cbf590d57cd10040491116077fa (diff)
parent3fce5ba59ad7ce7033ecf135e45ce768b7f81026 (diff)
svn merge -r 15409:15529 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp9
-rw-r--r--intern/moto/include/GEN_Map.h18
2 files changed, 27 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 82a76b3c706..293f8fc1661 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -302,6 +302,15 @@ GHOST_TSuccess GHOST_SystemWin32::init()
{
GHOST_TSuccess success = GHOST_System::init();
+ /* Disable scaling on high DPI displays on Vista */
+ HMODULE user32 = ::LoadLibraryA("user32.dll");
+ typedef BOOL (WINAPI * LPFNSETPROCESSDPIAWARE)();
+ LPFNSETPROCESSDPIAWARE SetProcessDPIAware =
+ (LPFNSETPROCESSDPIAWARE)GetProcAddress(user32, "SetProcessDPIAware");
+ if (SetProcessDPIAware)
+ SetProcessDPIAware();
+ FreeLibrary(user32);
+
// Determine whether this system has a high frequency performance counter. */
m_hasPerformanceCounter = ::QueryPerformanceFrequency((LARGE_INTEGER*)&m_freq) == TRUE;
if (m_hasPerformanceCounter) {
diff --git a/intern/moto/include/GEN_Map.h b/intern/moto/include/GEN_Map.h
index db3335d6110..9f56924419e 100644
--- a/intern/moto/include/GEN_Map.h
+++ b/intern/moto/include/GEN_Map.h
@@ -82,6 +82,24 @@ public:
}
return 0;
}
+
+ Key* getKey(int index) {
+ int count=0;
+ for (int i=0;i<m_num_buckets;i++)
+ {
+ Entry* bucket = m_buckets[i];
+ while(bucket)
+ {
+ if (count==index)
+ {
+ return &bucket->m_key;
+ }
+ bucket = bucket->m_next;
+ count++;
+ }
+ }
+ return 0;
+ }
void clear() {
for (int i = 0; i < m_num_buckets; ++i) {