-
Notifications
You must be signed in to change notification settings - Fork 5
/
KPlugin.h
34 lines (28 loc) · 871 Bytes
/
KPlugin.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Use of this source code is governed by GPL3-License
// that can be found in the License file.
//
// Copyright (C) 2023 - present
//
// Author: Sunrisepeak ([email protected])
// ProjectLinks: https://github.com/Sunrisepeak/KHistory
//
// Modify History:
// 2023/8/4 sunrisepeak add license
//
//
#ifndef __KPLUGIN_H__KHISTORY
#define __KPLUGIN_H__KHISTORY
// Basic/Demo Plugin
#include "Keyboard.kplugin.hpp"
#include "Gamepad.kplugin.hpp"
#define KPLUGIN_REGISTER(PLUGIN_TYPE) \
static khistory::PLUGIN_TYPE __gPlugin##PLUGIN_TYPE; \
auto __gUnused##PLUGIN_TYPE = khistory::KeyHistory::_registerPlugin(&__gPlugin##PLUGIN_TYPE);
// Note: it is auto-generate by script
#include "plugin-auto-register-info.kplugin"
static void loadKPlugin() {
KPLUGIN_REGISTER(Keyboard);
KPLUGIN_REGISTER(Gamepad);
loadAutoRegisterPlugin();
}
#endif