|
@@ -3,6 +3,8 @@
|
|
|
|
|
|
|
|
enum SubmenuIndex {
|
|
enum SubmenuIndex {
|
|
|
SubmenuIndexLoad = POF_TOKEN_LIMIT,
|
|
SubmenuIndexLoad = POF_TOKEN_LIMIT,
|
|
|
|
|
+ SubmenuIndexSwapHid,
|
|
|
|
|
+ SubmenuIndexSwapXbox360
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
void pof_scene_main_submenu_callback(void* context, uint32_t index) {
|
|
void pof_scene_main_submenu_callback(void* context, uint32_t index) {
|
|
@@ -10,13 +12,6 @@ void pof_scene_main_submenu_callback(void* context, uint32_t index) {
|
|
|
view_dispatcher_send_custom_event(pof->view_dispatcher, index);
|
|
view_dispatcher_send_custom_event(pof->view_dispatcher, index);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void pof_scene_main_submenu_type_callback(void* context, PoFType type) {
|
|
|
|
|
- PoFApp* pof = context;
|
|
|
|
|
- pof_stop(pof);
|
|
|
|
|
- pof->type = type;
|
|
|
|
|
- pof_start(pof);
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
void pof_scene_main_on_update(void* context) {
|
|
void pof_scene_main_on_update(void* context) {
|
|
|
PoFApp* pof = context;
|
|
PoFApp* pof = context;
|
|
|
VirtualPortal* virtual_portal = pof->virtual_portal;
|
|
VirtualPortal* virtual_portal = pof->virtual_portal;
|
|
@@ -30,15 +25,15 @@ void pof_scene_main_on_update(void* context) {
|
|
|
submenu_add_item(
|
|
submenu_add_item(
|
|
|
submenu,
|
|
submenu,
|
|
|
"Emulate Xbox 360",
|
|
"Emulate Xbox 360",
|
|
|
- PoFXbox360,
|
|
|
|
|
- pof_scene_main_submenu_type_callback,
|
|
|
|
|
|
|
+ SubmenuIndexSwapXbox360,
|
|
|
|
|
+ pof_scene_main_submenu_callback,
|
|
|
pof);
|
|
pof);
|
|
|
} else if (pof->type == PoFXbox360) {
|
|
} else if (pof->type == PoFXbox360) {
|
|
|
submenu_add_item(
|
|
submenu_add_item(
|
|
|
submenu,
|
|
submenu,
|
|
|
"Emulate HID",
|
|
"Emulate HID",
|
|
|
- PoFHid,
|
|
|
|
|
- pof_scene_main_submenu_type_callback,
|
|
|
|
|
|
|
+ SubmenuIndexSwapHid,
|
|
|
|
|
+ pof_scene_main_submenu_callback,
|
|
|
pof);
|
|
pof);
|
|
|
}
|
|
}
|
|
|
int count = 0;
|
|
int count = 0;
|
|
@@ -93,6 +88,14 @@ bool pof_scene_main_on_event(void* context, SceneManagerEvent event) {
|
|
|
scene_manager_next_scene(pof->scene_manager, PoFSceneFileSelect);
|
|
scene_manager_next_scene(pof->scene_manager, PoFSceneFileSelect);
|
|
|
}
|
|
}
|
|
|
consumed = true;
|
|
consumed = true;
|
|
|
|
|
+ } else if (event.event == SubmenuIndexSwapHid) {
|
|
|
|
|
+ pof_stop(pof);
|
|
|
|
|
+ pof->type = PoFXbox360;
|
|
|
|
|
+ pof_start(pof);
|
|
|
|
|
+ } else if (event.event == SubmenuIndexSwapXbox360) {
|
|
|
|
|
+ pof_stop(pof);
|
|
|
|
|
+ pof->type = PoFXbox360;
|
|
|
|
|
+ pof_start(pof);
|
|
|
} else {
|
|
} else {
|
|
|
scene_manager_set_scene_state(pof->scene_manager, PoFSceneMain, event.event);
|
|
scene_manager_set_scene_state(pof->scene_manager, PoFSceneMain, event.event);
|
|
|
pof_token_clear(virtual_portal->tokens[event.event], true);
|
|
pof_token_clear(virtual_portal->tokens[event.event], true);
|