mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 03:55:19 -04:00
3DS: You can click stuff I guess
This commit is contained in:
parent
44348c432c
commit
5347d136ef
@ -30,13 +30,15 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <sys/ucontext.h>
|
#include <sys/ucontext.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CC_BUILD_DARWIN
|
#ifdef CC_BUILD_DARWIN
|
||||||
/* Need this to detect macOS < 10.4, and switch to NS* api instead if so */
|
/* Need this to detect macOS < 10.4, and switch to NS* api instead if so */
|
||||||
#include <AvailabilityMacros.h>
|
#include <AvailabilityMacros.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Only show up to 40 frames in backtrace */
|
/* Only show up to 40 frames in backtrace */
|
||||||
#define MAX_BACKTRACE_FRAMES 40
|
#define MAX_BACKTRACE_FRAMES 40x
|
||||||
|
|
||||||
|
static void AbortCommon(cc_result result, const char* raw_msg, void* ctx);
|
||||||
|
|
||||||
|
|
||||||
/*########################################################################################################################*
|
/*########################################################################################################################*
|
||||||
@ -1039,8 +1041,6 @@ void Logger_Hook(void) {
|
|||||||
/*########################################################################################################################*
|
/*########################################################################################################################*
|
||||||
*-------------------------------------------------Deliberate crash logging------------------------------------------------*
|
*-------------------------------------------------Deliberate crash logging------------------------------------------------*
|
||||||
*#########################################################################################################################*/
|
*#########################################################################################################################*/
|
||||||
static void AbortCommon(cc_result result, const char* raw_msg, void* ctx);
|
|
||||||
|
|
||||||
#if defined CC_BUILD_WIN
|
#if defined CC_BUILD_WIN
|
||||||
#if __GNUC__
|
#if __GNUC__
|
||||||
/* Don't want compiler doing anything fancy with registers */
|
/* Don't want compiler doing anything fancy with registers */
|
||||||
|
@ -11,14 +11,10 @@
|
|||||||
extern cc_bool Input_RawMode; // Otherwise KEY_ conflicts with 3DS keys
|
extern cc_bool Input_RawMode; // Otherwise KEY_ conflicts with 3DS keys
|
||||||
#include "_WindowBase.h"
|
#include "_WindowBase.h"
|
||||||
|
|
||||||
struct _DisplayData DisplayInfo;
|
|
||||||
struct _WinData WindowInfo;
|
|
||||||
|
|
||||||
// Note from https://github.com/devkitPro/libctru/blob/master/libctru/include/3ds/gfx.h
|
// Note from https://github.com/devkitPro/libctru/blob/master/libctru/include/3ds/gfx.h
|
||||||
// * Please note that the 3DS uses *portrait* screens rotated 90 degrees counterclockwise.
|
// * Please note that the 3DS uses *portrait* screens rotated 90 degrees counterclockwise.
|
||||||
// * Width/height refer to the physical dimensions of the screen; that is, the top screen
|
// * Width/height refer to the physical dimensions of the screen; that is, the top screen
|
||||||
// * is 240 pixels wide and 400 pixels tall; while the bottom screen is 240x320.
|
// * is 240 pixels wide and 400 pixels tall; while the bottom screen is 240x320.
|
||||||
|
|
||||||
void Window_Init(void) {
|
void Window_Init(void) {
|
||||||
//gfxInit(GSP_BGR8_OES,GSP_BGR8_OES,false);
|
//gfxInit(GSP_BGR8_OES,GSP_BGR8_OES,false);
|
||||||
//gfxInit(GSP_BGR8_OES,GSP_RGBA8_OES,false);
|
//gfxInit(GSP_BGR8_OES,GSP_RGBA8_OES,false);
|
||||||
@ -65,6 +61,31 @@ void Window_Close(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Window_ProcessEvents(void) {
|
void Window_ProcessEvents(void) {
|
||||||
|
hidScanInput();
|
||||||
|
/* TODO implement */
|
||||||
|
|
||||||
|
if (hidKeysDown() & KEY_TOUCH)
|
||||||
|
Input_SetPressed(119); // LMOUSE
|
||||||
|
|
||||||
|
if (hidKeysUp() & KEY_TOUCH)
|
||||||
|
Input_SetReleased(119); // LMOUSE
|
||||||
|
|
||||||
|
if (hidKeysHeld() & KEY_TOUCH) {
|
||||||
|
int x, y;
|
||||||
|
Cursor_GetRawPos(&x, &y);
|
||||||
|
Pointer_SetPosition(0, x, y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void Cursor_GetRawPos(int* x, int* y) {
|
||||||
|
touchPosition touch;
|
||||||
|
hidTouchRead(&touch);
|
||||||
|
|
||||||
|
*x = touch.px;
|
||||||
|
*y = touch.py;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void Cursor_DoSetVisible(cc_bool visible) {
|
||||||
/* TODO implement */
|
/* TODO implement */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,7 +143,7 @@ void Window_OpenKeyboard(struct OpenKeyboardArgs* args) { /* TODO implement */ }
|
|||||||
void Window_SetKeyboardText(const cc_string* text) { }
|
void Window_SetKeyboardText(const cc_string* text) { }
|
||||||
void Window_CloseKeyboard(void) { /* TODO implement */ }
|
void Window_CloseKeyboard(void) { /* TODO implement */ }
|
||||||
|
|
||||||
void Window_EnableRawMouse(void) { }
|
void Window_EnableRawMouse(void) { DefaultEnableRawMouse(); }
|
||||||
void Window_UpdateRawMouse(void) { }
|
void Window_UpdateRawMouse(void) { DefaultUpdateRawMouse(); }
|
||||||
void Window_DisableRawMouse(void) { }
|
void Window_DisableRawMouse(void) { DefaultDisableRawMouse(); }
|
||||||
#endif
|
#endif
|
Loading…
x
Reference in New Issue
Block a user