Indentation fixes

This commit is contained in:
Twinaphex 2012-05-29 15:25:39 +02:00
parent b995f8da9f
commit 68af1626d9
8 changed files with 1292 additions and 1324 deletions

View File

@ -86,7 +86,8 @@ typedef struct {
// All elements are defaulted to NULL
static Font_Locals_t s_FontLocals; // Global static instance
static void xdk360_video_font_draw_text(xdk360_video_font_t * font, float fOriginX, float fOriginY, unsigned long dwColor,
static void xdk360_video_font_draw_text(xdk360_video_font_t * font,
float fOriginX, float fOriginY, unsigned long dwColor,
const wchar_t * strText, float fMaxPixelWidth )
{
if( strText == NULL || strText[0] == L'\0')
@ -164,7 +165,8 @@ static void xdk360_video_font_draw_text(xdk360_video_font_t * font, float fOrigi
}
// Translate unprintable characters
const GLYPH_ATTR * pGlyph = &font->m_Glyphs[ ( letter <= font->m_cMaxGlyph ) ? font->m_TranslatorTable[letter] : 0 ];
const GLYPH_ATTR * pGlyph = &font->m_Glyphs[ ( letter <= font->m_cMaxGlyph )
? font->m_TranslatorTable[letter] : 0 ];
float fOffset = font->m_fXScaleFactor * (float)pGlyph->wOffset;
float fAdvance = font->m_fXScaleFactor * (float)pGlyph->wAdvance;

View File

@ -296,6 +296,7 @@ HRESULT CRetroArchQuickMenu::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
{
GetChildById(L"XuiQuickMenuList", &m_quickmenulist);
GetChildById(L"XuiBackButton", &m_back);
switch(g_console.screen_orientation)
{
case ORIENTATION_NORMAL:
@ -311,6 +312,7 @@ HRESULT CRetroArchQuickMenu::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
m_quickmenulist.SetText(MENU_ITEM_ORIENTATION, L"Orientation: Flipped Rotated");
break;
}
char aspectratio_label[32];
snprintf(aspectratio_label, sizeof(aspectratio_label), "Aspect Ratio: %s", aspectratio_lut[g_console.aspect_ratio_index].name);
wchar_t * aspectratio_label_w = rarch_convert_char_to_wchar(aspectratio_label);
@ -646,6 +648,7 @@ HRESULT CRetroArchSettings::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled
RARCH_ERR("Failed to load scene.\n");
}
hCur = app.hShaderBrowser;
if (g_console.info_msg_enable)
{
msg_queue_clear(g_extern.msg_queue);
@ -830,9 +833,7 @@ void menu_loop(void)
if(!g_console.emulator_initialized)
d3d9->d3d_render_device->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0, 0, 0, 0), 1.0f, 0);
else
{
rarch_render_cached_frame();
}
XINPUT_STATE state;
XInputGetState(0, &state);
@ -840,6 +841,7 @@ void menu_loop(void)
g_console.menu_enable = !((state.Gamepad.wButtons & XINPUT_GAMEPAD_LEFT_THUMB)
&& (state.Gamepad.wButtons & XINPUT_GAMEPAD_RIGHT_THUMB) && (g_console.emulator_initialized)
&& IS_TIMER_EXPIRED(d3d9));
g_console.mode_switch = g_console.menu_enable ? MODE_MENU : MODE_EMULATION;
switch(g_console.input_loop)
@ -864,8 +866,6 @@ void menu_loop(void)
SET_TIMER_EXPIRATION(d3d9, 30);
}
/* XBox 360 specific font code */
{
const char *msg = msg_queue_pull(g_extern.msg_queue);
if (msg)
@ -878,7 +878,6 @@ void menu_loop(void)
xdk360_console_draw();
}
}
gfx_ctx_swap_buffers();
}while(g_console.menu_enable);

View File

@ -64,7 +64,7 @@ enum
class CRetroArch : public CXuiModule
{
public:
public:
HXUIOBJ hMainScene;
HXUIOBJ hControlsMenu;
HXUIOBJ hFileBrowser;
@ -72,16 +72,14 @@ public:
HXUIOBJ hShaderBrowser;
HXUIOBJ hQuickMenu;
HXUIOBJ hRetroArchSettings;
protected:
/* Override so that Cssnes can register classes */
protected:
virtual HRESULT RegisterXuiClasses();
/* Override so that Cssnes can unregister classes */
virtual HRESULT UnregisterXuiClasses();
};
class CRetroArchMain: public CXuiSceneImpl
{
protected:
protected:
CXuiControl m_filebrowser;
CXuiControl m_quick_menu;
CXuiControl m_controls;
@ -90,7 +88,7 @@ protected:
CXuiControl m_quit;
CXuiTextElement m_title;
CXuiTextElement m_core;
public:
public:
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
@ -104,13 +102,13 @@ public:
class CRetroArchFileBrowser: public CXuiSceneImpl
{
protected:
protected:
CXuiList m_romlist;
CXuiControl m_back;
CXuiControl m_dir_game;
CXuiControl m_dir_cache;
CXuiTextElement m_rompathtitle;
public:
public:
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
@ -124,11 +122,11 @@ public:
class CRetroArchCoreBrowser: public CXuiSceneImpl
{
protected:
protected:
CXuiList m_romlist;
CXuiControl m_back;
CXuiTextElement m_rompathtitle;
public:
public:
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
@ -142,11 +140,11 @@ public:
class CRetroArchShaderBrowser: public CXuiSceneImpl
{
protected:
protected:
CXuiList m_shaderlist;
CXuiControl m_back;
CXuiTextElement m_shaderpathtitle;
public:
public:
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
@ -160,10 +158,10 @@ public:
class CRetroArchQuickMenu: public CXuiSceneImpl
{
protected:
protected:
CXuiList m_quickmenulist;
CXuiControl m_back;
public:
public:
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
@ -177,10 +175,10 @@ public:
class CRetroArchSettings: public CXuiSceneImpl
{
protected:
protected:
CXuiList m_settingslist;
CXuiControl m_back;
public:
public:
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
HRESULT OnControlNavigate(XUIMessageControlNavigate *pControlNavigateData, BOOL& bHandled);
@ -196,11 +194,11 @@ public:
class CRetroArchControls: public CXuiSceneImpl
{
protected:
protected:
CXuiList m_controlslist;
CXuiControl m_back;
CXuiSlider m_controlnoslider;
public:
public:
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
HRESULT OnControlNavigate(XUIMessageControlNavigate *pControlNavigateData, BOOL& bHandled);

View File

@ -14,7 +14,6 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
// Xbox 360-specific headers
#ifdef _XBOX
#include <xtl.h>
#include <xgraphics.h>
@ -152,6 +151,7 @@ HRESULT PackedResource::Create( const char * strFilename )
unsigned long dwNumBytesRead;
void * hFile = CreateFile( strFilename, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL );
if( hFile == INVALID_HANDLE_VALUE )
{
RARCH_ERR( "File <%s> not found.\n", strFilename );
@ -459,6 +459,7 @@ static void *xdk360_init(const video_info_t *video, const input_driver_t **input
d3d9->d3dpp.BackBufferWidth = d3d9->video_mode.fIsHiDef ? 1280 : 640;
d3d9->d3dpp.BackBufferHeight = d3d9->video_mode.fIsHiDef ? 720 : 480;
if(g_console.gamma_correction_enable)
{
d3d9->d3dpp.BackBufferFormat = g_console.color_format ? (D3DFORMAT)MAKESRGBFMT(D3DFMT_A8R8G8B8) : (D3DFORMAT)MAKESRGBFMT(D3DFMT_LIN_A1R5G5B5);
@ -708,11 +709,6 @@ static bool xdk360_focus(void *data)
return gfx_ctx_window_has_focus();
}
// 360 needs a working graphics stack before RetroArch even starts.
// To deal with this main.c,
// the top level module owns the instance, and is created beforehand.
// When RetroArch gets around to init it, it is already allocated.
// When RetroArch wants to free it, it is ignored.
static void xdk360_start(void)
{
video_info_t video_info = {0};

View File

@ -19,11 +19,6 @@
#ifndef RARCH_360_RESOURCES_H
#define RARCH_360_RESOURCES_H
//--------------------------------------------------------------------------------------
// Name tag for resources. An app may initialize this structure, and pass
// it to the resource's Create() function. From then on, the app may call
// GetResource() to retrieve a resource using an ascii name.
//--------------------------------------------------------------------------------------
struct RESOURCE
{
unsigned long dwType;
@ -50,7 +45,7 @@ enum
//--------------------------------------------------------------------------------------
class PackedResource
{
protected:
protected:
unsigned char * m_pSysMemData; // Alloc'ed memory for resource headers etc.
unsigned long m_dwSysMemDataSize;
@ -59,10 +54,11 @@ protected:
RESOURCE* m_pResourceTags; // Tags to associate names with the resources
unsigned long m_dwNumResourceTags; // Number of resource tags
public:
public:
int m_bInitialized; // Resource is fully initialized
HRESULT Create( const char * strFilename );
void Destroy();
D3DResource* RegisterResource( D3DResource* pResource ) const
{
return pResource;

View File

@ -447,7 +447,6 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
0,
1
},
/* end of port-specific */
{
SETTING_PATH_DEFAULT_ROM_DIRECTORY,
"Startup ROM Directory",

View File

@ -318,9 +318,7 @@ static void browser_update(filebrowser_t * b)
}
if (CTRL_CIRCLE(button_was_pressed))
{
filebrowser_pop_directory(b);
}
old_state = state;
}
@ -888,9 +886,7 @@ static void select_file(uint32_t menu_id)
/*if 'filename' is in fact '..' - then pop back directory instead of
adding '..' to filename path */
if(tmpBrowser.currently_selected == 0)
{
filebrowser_pop_directory(&tmpBrowser);
}
else
{
separatorslash = (strcmp(FILEBROWSER_GET_CURRENT_DIRECTORY_NAME(tmpBrowser),"/") == 0) ? "" : "/";
@ -1036,9 +1032,7 @@ static void select_directory(uint32_t menu_id)
* adding '..' to filename path */
if(tmpBrowser.currently_selected == 0)
{
filebrowser_pop_directory(&tmpBrowser);
}
else
{
separatorslash = (strcmp(FILEBROWSER_GET_CURRENT_DIRECTORY_NAME(tmpBrowser),"/") == 0) ? "" : "/";
@ -1497,14 +1491,10 @@ static void producesettingentry(menu * menu_obj, uint64_t switchvalue)
if(CTRL_UP(state) || CTRL_LSTICK_UP(state) || CTRL_DOWN(state) || CTRL_LSTICK_DOWN(state))
{
if(g_console.sound_mode != SOUND_MODE_RSOUND)
{
rarch_console_rsound_stop();
}
else
{
rarch_console_rsound_start(g_settings.audio.device);
}
}
if(CTRL_START(state))
{
g_console.sound_mode = SOUND_MODE_NORMAL;
@ -1595,13 +1585,10 @@ static void producesettingentry(menu * menu_obj, uint64_t switchvalue)
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
{
g_extern.audio_data.mute = !g_extern.audio_data.mute;
set_delay = DELAY_MEDIUM;
}
if(CTRL_START(state))
{
g_extern.audio_data.mute = false;
}
break;
case SETTING_ENABLE_CUSTOM_BGM:
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state))
@ -1727,9 +1714,7 @@ static void producesettingentry(menu * menu_obj, uint64_t switchvalue)
set_delay = DELAY_LONG;
}
if(CTRL_START(state))
{
menu_reinit_settings();
}
break;
case SETTING_CONTROLS_NUMBER:
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_CROSS(state))
@ -1798,9 +1783,7 @@ static void producesettingentry(menu * menu_obj, uint64_t switchvalue)
break;
case SETTING_CONTROLS_SAVE_CUSTOM_CONTROLS:
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state) || CTRL_START(state))
{
rarch_filename_input_and_save(INPUT_PRESET_FILE);
}
break;
case SETTING_CONTROLS_DEFAULT_ALL:
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state) || CTRL_START(state))
@ -2028,7 +2011,6 @@ static void ingame_menu(uint32_t menu_id)
menuitem_colors[g_console.ingame_menu_item] = RED;
state = cell_pad_input_poll_device(0);
stuck_in_loop = 1;
blocking = 0;
@ -2221,13 +2203,9 @@ static void ingame_menu(uint32_t menu_id)
rarch_render_cached_frame();
if(CTRL_SQUARE(state))
{
gl->menu_render = false;
}
else
{
gl->menu_render = true;
}
if(CTRL_LSTICK_LEFT(state) || CTRL_LEFT(state))
g_console.viewports.custom_vp.x -= 1;