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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-04-12 06:15:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-12 06:15:33 +0400
commitcc1259178b95d084a7ca9e83c90ef0ab97b7fa86 (patch)
treefb6b69a28ea45fb30373bdc4e387b0eebde4b3ce /intern/ghost
parent5aaf3ede76c91a062d09360301083b6f75a6a89f (diff)
code cleanup: utfconv library had some quite confusing formatting, also cleared som warnings.
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/intern/GHOST_SystemPathsWin32.cpp8
-rw-r--r--intern/ghost/intern/GHOST_SystemPathsWin32.h2
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp29
3 files changed, 22 insertions, 17 deletions
diff --git a/intern/ghost/intern/GHOST_SystemPathsWin32.cpp b/intern/ghost/intern/GHOST_SystemPathsWin32.cpp
index e3defddf367..0023ceb87f0 100644
--- a/intern/ghost/intern/GHOST_SystemPathsWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemPathsWin32.cpp
@@ -114,10 +114,10 @@ const GHOST_TUns8* GHOST_SystemPathsWin32::getBinaryDir() const
return NULL;
}
-void GHOST_SystemPathsWin32::addToSystemRecentFiles(const char* filename) const
+void GHOST_SystemPathsWin32::addToSystemRecentFiles(const char *filename) const
{
/* SHARD_PATH resolves to SHARD_PATHA for non-UNICODE build */
- UTF16_ENCODE(filename)
- SHAddToRecentDocs(SHARD_PATHW,filename_16);
- UTF16_UN_ENCODE(filename)
+ UTF16_ENCODE(filename);
+ SHAddToRecentDocs(SHARD_PATHW, filename_16);
+ UTF16_UN_ENCODE(filename);
}
diff --git a/intern/ghost/intern/GHOST_SystemPathsWin32.h b/intern/ghost/intern/GHOST_SystemPathsWin32.h
index a56a2e07b96..f53b33da756 100644
--- a/intern/ghost/intern/GHOST_SystemPathsWin32.h
+++ b/intern/ghost/intern/GHOST_SystemPathsWin32.h
@@ -85,7 +85,7 @@ public:
/**
* Add the file to the operating system most recently used files
*/
- void addToSystemRecentFiles(const char* filename) const;
+ void addToSystemRecentFiles(const char *filename) const;
};
#endif // __GHOST_SYSTEMPATHSWIN32_H__
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index b79185b1637..e6ac48fa6c8 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -724,19 +724,25 @@ GHOST_EventKey* GHOST_SystemWin32::processKeyEvent(GHOST_IWindow *window, RAWINP
wchar_t utf16[3]={0};
BYTE state[256] ={0};
int r;
- GetKeyboardState((PBYTE)state);
+ GetKeyboardState((PBYTE)state);
- if(r = ToUnicodeEx(vk, 0, state, utf16, 2, 0, system->m_keylayout))
-
- if((r>0 && r<3)){utf16[r]=0;
-
- conv_utf_16_to_8(utf16,utf8_char,6);}
- else if (r==-1) utf8_char[0] = '\0';
-
-
+ if(r = ToUnicodeEx(vk, 0, state, utf16, 2, 0, system->m_keylayout)) {
+ if((r>0 && r<3)){
+ utf16[r]=0;
+ conv_utf_16_to_8(utf16,utf8_char,6);
+ }
+ else if (r==-1) {
+ utf8_char[0] = '\0';
+ }
+ }
- if(!keyDown) {utf8_char[0] = '\0'; ascii='\0';}
- else ascii = utf8_char[0]& 0x80?'?':utf8_char[0];
+ if(!keyDown) {
+ utf8_char[0] = '\0';
+ ascii='\0';
+ }
+ else {
+ ascii = utf8_char[0]& 0x80?'?' : utf8_char[0];
+ }
if(0x80&state[VK_MENU]) utf8_char[0]='\0';
@@ -1253,7 +1259,6 @@ GHOST_TUns8* GHOST_SystemWin32::getClipboard(bool selection) const
if ( IsClipboardFormatAvailable(CF_UNICODETEXT) && OpenClipboard(NULL) ) {
wchar_t *buffer;
- size_t len = 0;
HANDLE hData = GetClipboardData( CF_UNICODETEXT );
if (hData == NULL) {
CloseClipboard();