mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 02:25:32 -04:00
Release 1.1.1
This commit is contained in:
parent
cb3344c629
commit
c943e7ca33
@ -5,18 +5,18 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define GAME_MAX_CMDARGS 5
|
#define GAME_MAX_CMDARGS 5
|
||||||
#define GAME_APP_VER "1.1.0"
|
#define GAME_APP_VER "1.1.1"
|
||||||
#define GAME_API_VER 1
|
#define GAME_API_VER 1
|
||||||
|
|
||||||
#if defined CC_BUILD_WEB
|
#if defined CC_BUILD_WEB
|
||||||
#define GAME_APP_NAME "ClassiCube web client"
|
#define GAME_APP_NAME "ClassiCube web client"
|
||||||
#define GAME_APP_TITLE "ClassiCube"
|
#define GAME_APP_TITLE "ClassiCube"
|
||||||
#elif defined CC_BUILD_COCOA
|
#elif defined CC_BUILD_COCOA
|
||||||
#define GAME_APP_NAME "ClassiCube 1.1.0 alpha"
|
#define GAME_APP_NAME "ClassiCube 1.1.1 alpha"
|
||||||
#define GAME_APP_TITLE "ClassiCube 1.1.0 alpha"
|
#define GAME_APP_TITLE "ClassiCube 1.1.1 alpha"
|
||||||
#else
|
#else
|
||||||
#define GAME_APP_NAME "ClassiCube 1.1.0"
|
#define GAME_APP_NAME "ClassiCube 1.1.1"
|
||||||
#define GAME_APP_TITLE "ClassiCube 1.1.0"
|
#define GAME_APP_TITLE "ClassiCube 1.1.1"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Max number of characters strings can have. */
|
/* Max number of characters strings can have. */
|
||||||
|
15
src/Window.c
15
src/Window.c
@ -418,24 +418,29 @@ void Window_SetTitle(const String* title) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Clipboard_GetText(String* value) {
|
void Clipboard_GetText(String* value) {
|
||||||
/* retry up to 50 times */
|
cc_bool unicode;
|
||||||
|
HANDLE hGlobal;
|
||||||
|
LPVOID src;
|
||||||
|
SIZE_T size;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
/* retry up to 50 times */
|
||||||
for (i = 0; i < 50; i++) {
|
for (i = 0; i < 50; i++) {
|
||||||
if (!OpenClipboard(win_handle)) {
|
if (!OpenClipboard(win_handle)) {
|
||||||
Thread_Sleep(10);
|
Thread_Sleep(10);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
cc_bool unicode = true;
|
unicode = true;
|
||||||
HANDLE hGlobal = GetClipboardData(CF_UNICODETEXT);
|
hGlobal = GetClipboardData(CF_UNICODETEXT);
|
||||||
if (!hGlobal) {
|
if (!hGlobal) {
|
||||||
hGlobal = GetClipboardData(CF_TEXT);
|
hGlobal = GetClipboardData(CF_TEXT);
|
||||||
unicode = false;
|
unicode = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hGlobal) { CloseClipboard(); return; }
|
if (!hGlobal) { CloseClipboard(); return; }
|
||||||
LPVOID src = GlobalLock(hGlobal);
|
src = GlobalLock(hGlobal);
|
||||||
SIZE_T size = GlobalSize(hGlobal);
|
size = GlobalSize(hGlobal);
|
||||||
|
|
||||||
/* ignore trailing NULL at end */
|
/* ignore trailing NULL at end */
|
||||||
/* TODO: Verify it's always there */
|
/* TODO: Verify it's always there */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user