mirror of
https://github.com/Maschell/dynamic_libs.git
synced 2024-11-29 07:24:13 +01:00
Added ProcUI functions
This commit is contained in:
parent
eb186a7795
commit
7a31349744
@ -48,6 +48,8 @@ EXPORT_DECL(s32, OSIsThreadSuspended, void *thread);
|
|||||||
EXPORT_DECL(s32, OSSetThreadPriority, void * thread, s32 priority);
|
EXPORT_DECL(s32, OSSetThreadPriority, void * thread, s32 priority);
|
||||||
EXPORT_DECL(s32, OSJoinThread, void * thread, s32 * ret_val);
|
EXPORT_DECL(s32, OSJoinThread, void * thread, s32 * ret_val);
|
||||||
EXPORT_DECL(void, OSDetachThread, void * thread);
|
EXPORT_DECL(void, OSDetachThread, void * thread);
|
||||||
|
EXPORT_DECL(void *,OSGetCurrentThread,void);
|
||||||
|
EXPORT_DECL(const char *,OSGetThreadName,void * thread);
|
||||||
EXPORT_DECL(void, OSSleepTicks, u64 ticks);
|
EXPORT_DECL(void, OSSleepTicks, u64 ticks);
|
||||||
EXPORT_DECL(u64, OSGetTick, void);
|
EXPORT_DECL(u64, OSGetTick, void);
|
||||||
EXPORT_DECL(u64, OSGetTime, void);
|
EXPORT_DECL(u64, OSGetTime, void);
|
||||||
@ -239,6 +241,8 @@ void InitOSFunctionPointers(void)
|
|||||||
OS_FIND_EXPORT(coreinit_handle, OSJoinThread);
|
OS_FIND_EXPORT(coreinit_handle, OSJoinThread);
|
||||||
OS_FIND_EXPORT(coreinit_handle, OSSetThreadPriority);
|
OS_FIND_EXPORT(coreinit_handle, OSSetThreadPriority);
|
||||||
OS_FIND_EXPORT(coreinit_handle, OSDetachThread);
|
OS_FIND_EXPORT(coreinit_handle, OSDetachThread);
|
||||||
|
OS_FIND_EXPORT(coreinit_handle, OSGetCurrentThread);
|
||||||
|
OS_FIND_EXPORT(coreinit_handle, OSGetThreadName);
|
||||||
OS_FIND_EXPORT(coreinit_handle, OSSleepTicks);
|
OS_FIND_EXPORT(coreinit_handle, OSSleepTicks);
|
||||||
OS_FIND_EXPORT(coreinit_handle, OSGetTick);
|
OS_FIND_EXPORT(coreinit_handle, OSGetTick);
|
||||||
OS_FIND_EXPORT(coreinit_handle, OSGetTime);
|
OS_FIND_EXPORT(coreinit_handle, OSGetTime);
|
||||||
|
@ -87,6 +87,9 @@ extern s32 (* OSIsThreadSuspended)(void *thread);
|
|||||||
extern s32 (* OSJoinThread)(void * thread, s32 * ret_val);
|
extern s32 (* OSJoinThread)(void * thread, s32 * ret_val);
|
||||||
extern s32 (* OSSetThreadPriority)(void * thread, s32 priority);
|
extern s32 (* OSSetThreadPriority)(void * thread, s32 priority);
|
||||||
extern void (* OSDetachThread)(void * thread);
|
extern void (* OSDetachThread)(void * thread);
|
||||||
|
|
||||||
|
extern void * (* OSGetCurrentThread)(void);
|
||||||
|
extern const char * (* OSGetThreadName)(void * thread);
|
||||||
extern void (* OSSleepTicks)(u64 ticks);
|
extern void (* OSSleepTicks)(u64 ticks);
|
||||||
extern u64 (* OSGetTick)(void);
|
extern u64 (* OSGetTick)(void);
|
||||||
extern u64 (* OSGetTime)(void);
|
extern u64 (* OSGetTime)(void);
|
||||||
|
44
proc_ui_functions.c
Normal file
44
proc_ui_functions.c
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* Copyright (C) 2015
|
||||||
|
* by Dimok
|
||||||
|
*
|
||||||
|
* This software is provided 'as-is', without any express or implied
|
||||||
|
* warranty. In no event will the authors be held liable for any
|
||||||
|
* damages arising from the use of this software.
|
||||||
|
*
|
||||||
|
* Permission is granted to anyone to use this software for any
|
||||||
|
* purpose, including commercial applications, and to alter it and
|
||||||
|
* redistribute it freely, subject to the following restrictions:
|
||||||
|
*
|
||||||
|
* 1. The origin of this software must not be misrepresented; you
|
||||||
|
* must not claim that you wrote the original software. If you use
|
||||||
|
* this software in a product, an acknowledgment in the product
|
||||||
|
* documentation would be appreciated but is not required.
|
||||||
|
*
|
||||||
|
* 2. Altered source versions must be plainly marked as such, and
|
||||||
|
* must not be misrepresented as being the original software.
|
||||||
|
*
|
||||||
|
* 3. This notice may not be removed or altered from any source
|
||||||
|
* distribution.
|
||||||
|
***************************************************************************/
|
||||||
|
#include "os_functions.h"
|
||||||
|
#include "proc_ui_functions.h"
|
||||||
|
|
||||||
|
u32 proc_ui_handle __attribute__((section(".data"))) = 0;
|
||||||
|
|
||||||
|
EXPORT_DECL(u32, ProcUIInForeground, void);
|
||||||
|
EXPORT_DECL(void, ProcUIRegisterCallback, u32 type,ProcUICallback callback,void* param, u32 unkwn);
|
||||||
|
|
||||||
|
void InitAcquireProcUI(void)
|
||||||
|
{
|
||||||
|
OSDynLoad_Acquire("proc_ui.rpl", &proc_ui_handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
void InitProcUIFunctionPointers(void)
|
||||||
|
{
|
||||||
|
u32 *funcPointer = 0;
|
||||||
|
InitAcquireProcUI();
|
||||||
|
|
||||||
|
OS_FIND_EXPORT(proc_ui_handle, ProcUIInForeground);
|
||||||
|
OS_FIND_EXPORT(proc_ui_handle, ProcUIRegisterCallback);
|
||||||
|
}
|
47
proc_ui_functions.h
Normal file
47
proc_ui_functions.h
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* Copyright (C) 2015
|
||||||
|
* by Dimok
|
||||||
|
*
|
||||||
|
* This software is provided 'as-is', without any express or implied
|
||||||
|
* warranty. In no event will the authors be held liable for any
|
||||||
|
* damages arising from the use of this software.
|
||||||
|
*
|
||||||
|
* Permission is granted to anyone to use this software for any
|
||||||
|
* purpose, including commercial applications, and to alter it and
|
||||||
|
* redistribute it freely, subject to the following restrictions:
|
||||||
|
*
|
||||||
|
* 1. The origin of this software must not be misrepresented; you
|
||||||
|
* must not claim that you wrote the original software. If you use
|
||||||
|
* this software in a product, an acknowledgment in the product
|
||||||
|
* documentation would be appreciated but is not required.
|
||||||
|
*
|
||||||
|
* 2. Altered source versions must be plainly marked as such, and
|
||||||
|
* must not be misrepresented as being the original software.
|
||||||
|
*
|
||||||
|
* 3. This notice may not be removed or altered from any source
|
||||||
|
* distribution.
|
||||||
|
***************************************************************************/
|
||||||
|
#ifndef __PROC_UI_FUNCTIONS_H_
|
||||||
|
#define __PROC_UI_FUNCTIONS_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <gctypes.h>
|
||||||
|
|
||||||
|
extern u32 proc_ui_handle;
|
||||||
|
|
||||||
|
typedef u32 (*ProcUICallback)(void*);
|
||||||
|
|
||||||
|
void InitProcUIFunctionPointers(void);
|
||||||
|
void InitAcquireProcUI(void);
|
||||||
|
|
||||||
|
extern u32 (*ProcUIInForeground)(void);
|
||||||
|
extern void (*ProcUIRegisterCallback)(u32 type,ProcUICallback callback,void* param, u32 unkwn);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // __PROC_UI_FUNCTIONS_H_
|
Loading…
Reference in New Issue
Block a user