mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-22 17:12:25 -05:00
Fix last commit
This commit is contained in:
parent
8b2f1aec5b
commit
5635d06b7e
4 changed files with 9 additions and 6 deletions
|
@ -21,7 +21,7 @@
|
|||
#include "Game.h"
|
||||
|
||||
#define LAYOUTS static const struct LLayout
|
||||
#define IsBackButton(btn) (btn == CCKEY_ESCAPE || btn == CCPAD_SELECT || btn == CCPAD_B)
|
||||
#define IsBackButton(btn) (btn == CCKEY_ESCAPE || btn == CCPAD_SELECT || btn == CCPAD_2)
|
||||
|
||||
/*########################################################################################################################*
|
||||
*---------------------------------------------------------Screen base-----------------------------------------------------*
|
||||
|
@ -103,7 +103,7 @@ static void LScreen_KeyDown(struct LScreen* s, int key, cc_bool was) {
|
|||
if (s->selectedWidget->VTABLE->KeyDown(s->selectedWidget, key, was)) return;
|
||||
}
|
||||
|
||||
if (key == CCKEY_TAB || key == CCPAD_X) {
|
||||
if (key == CCKEY_TAB || key == CCPAD_3) {
|
||||
LScreen_CycleSelected(s, Input_IsShiftPressed() ? -1 : 1);
|
||||
} else if (Input_IsUpButton(key)) {
|
||||
LScreen_CycleSelected(s, -1);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef CC_PACKEDCOL_H
|
||||
#define CC_PACKEDCOL_H
|
||||
#include "Core.h"
|
||||
/* Manipulates a packed 32 bit RGBA colour, in a format suitable for the native 3D graphics API.
|
||||
/* Manipulates a packed 32 bit RGBA colour, in a format suitable for the native 3D graphics API vertex colours.
|
||||
Copyright 2014-2023 ClassiCube | Licensed under BSD-3
|
||||
*/
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ typedef struct cc_winstring_ {
|
|||
cc_unichar uni[NATIVE_STR_LEN]; /* String represented using UTF16 format */
|
||||
char ansi[NATIVE_STR_LEN]; /* String lossily represented using ANSI format */
|
||||
} cc_winstring;
|
||||
/* Encodes a string in UTF16 and ASCII format, also null terminating the string. */
|
||||
/* Encodes a string into the platform native string format */
|
||||
void Platform_EncodeString(cc_winstring* dst, const cc_string* src);
|
||||
|
||||
cc_bool Platform_DescribeErrorExt(cc_result res, cc_string* dst, void* lib);
|
||||
|
@ -58,6 +58,7 @@ typedef cc_winstring cc_filepath;
|
|||
typedef struct cc_filepath_ { char buffer[NATIVE_STR_LEN]; } cc_filepath;
|
||||
#define FILEPATH_RAW(raw) ((cc_filepath*)raw)
|
||||
#endif
|
||||
/* Converts the provided path into a platform native file path */
|
||||
void Platform_EncodePath(cc_filepath* dst, const cc_string* src);
|
||||
|
||||
/* Initialises the platform specific state. */
|
||||
|
|
|
@ -290,12 +290,14 @@ cc_result File_OpenOrCreate(cc_file* file, const cc_filepath* path) {
|
|||
}
|
||||
|
||||
cc_result File_Read(cc_file file, void* data, cc_uint32 count, cc_uint32* bytesRead) {
|
||||
BOOL success = ReadFile(file, data, count, bytesRead, NULL);
|
||||
/* NOTE: the (DWORD*) cast assumes that sizeof(long) is 4 */
|
||||
BOOL success = ReadFile(file, data, count, (DWORD*)bytesRead, NULL);
|
||||
return success ? 0 : GetLastError();
|
||||
}
|
||||
|
||||
cc_result File_Write(cc_file file, const void* data, cc_uint32 count, cc_uint32* bytesWrote) {
|
||||
BOOL success = WriteFile(file, data, count, bytesWrote, NULL);
|
||||
/* NOTE: the (DWORD*) cast assumes that sizeof(long) is 4 */
|
||||
BOOL success = WriteFile(file, data, count, (DWORD*)bytesWrote, NULL);
|
||||
return success ? 0 : GetLastError();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue