(360) Implemented rotation callback function

This commit is contained in:
TwinAphex51224 2012-04-01 16:10:02 +02:00
parent 0eb49deaa8
commit 525d9b3cf5
5 changed files with 8 additions and 6 deletions

View File

@ -238,7 +238,7 @@ HRESULT CSSNESQuickMenu::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled )
m_quickmenulist.SetText(MENU_ITEM_ORIENTATION, L"Orientation: Normal");
break;
}
xdk360_set_orientation(g_console.screen_orientation);
video_xdk360.set_rotation(NULL, g_console.screen_orientation);
break;
case MENU_ITEM_RESIZE_MODE:
break;

View File

@ -277,8 +277,9 @@ static void set_viewport(bool force_full)
//}
}
void xdk360_set_orientation(uint32_t orientation)
static void xdk360_set_orientation(void * data, uint32_t orientation)
{
(void)data;
xdk360_video_t *vid = (xdk360_video_t*)g_d3d;
FLOAT angle;
@ -498,7 +499,7 @@ static void *xdk360_gfx_init(const video_info_t *video, const input_driver_t **i
vp.MaxZ = 1.0f;
D3DDevice_SetViewport(vid->xdk360_render_device, &vp);
xdk360_set_orientation(g_console.screen_orientation);
xdk360_set_orientation(NULL, g_console.screen_orientation);
return vid;
}
@ -674,5 +675,6 @@ const video_driver_t video_xdk360 = {
xdk360_gfx_free,
"xdk360",
xdk360_set_swap_block_swap,
xdk360_swap
xdk360_swap,
xdk360_set_orientation
};

View File

@ -78,7 +78,6 @@ void xdk360_video_init(void);
void xdk360_video_deinit(void);
void xdk360_video_set_vsync(bool vsync);
void xdk360_set_aspect_ratio(uint32_t aspectratio_index);
void xdk360_set_orientation(uint32_t orientation);
extern void *g_d3d;

View File

@ -63,6 +63,7 @@
#define video_focus_func() xdk360_gfx_focus(driver.video_data)
#define video_xml_shader_func(path) driver.video->xml_shader(driver.video_data, path)
#define video_free_func() xdk360_gfx_free(driver.video_data)
#define video_set_rotation_func(orientation) xdk360_set_orientation(driver.video_data, orientation)
#define input_init_func() xdk360_input_initialize()
#define input_poll_func() xdk360_input_poll(driver.input_data)

View File

@ -157,6 +157,7 @@ static inline void adjust_crop(const uint16_t **data, unsigned *height)
}
}
}
#endif
static void readjust_audio_input_rate(void)
{
@ -175,7 +176,6 @@ static void readjust_audio_input_rate(void)
//fprintf(stderr, "New rate: %lf, Orig rate: %lf\n",
// g_extern.audio_data.src_ratio, g_extern.audio_data.orig_src_ratio);
}
#endif
// libsnes: 0.065
// Format received is 16-bit 0RRRRRGGGGGBBBBB