1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: gx_Misc.h 4 5 Copyright (C)2010 Nintendo Co., Ltd. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Rev: 34434 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_GX_CTR_GX_MISC_H_ 17 #define NN_GX_CTR_GX_MISC_H_ 18 19 #include <nn/types.h> 20 #include <nn/assert.h> 21 22 /*-------------------------------------------------------------------------- 23 C API 24 *-------------------------------------------------------------------------*/ 25 /*! 26 @addtogroup nn_gx gx 27 @{ 28 */ 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif // __cplusplus 33 34 typedef enum nngxMemAccessPrioMode 35 { 36 NN_GX_MEM_ACCESS_PRIO_MODE_0 = 0x00000000, 37 NN_GX_MEM_ACCESS_PRIO_MODE_1 = 0x00000205, 38 NN_GX_MEM_ACCESS_PRIO_MODE_2 = 0x00000203, 39 NN_GX_MEM_ACCESS_PRIO_MODE_3 = 0x00000305, 40 NN_GX_MEM_ACCESS_PRIO_MODE_4 = 0x00000105, 41 42 NN_GX_MEM_ACCESS_PRIO_MODE_MAX = 0x7FFFFFFF 43 } nngxMemAccessPrioMode; 44 45 46 /*!--------------------------------------------------------------------------* 47 @brief メインメモリ(FCRAM)へのアクセス優先度の設定を行います。 48 49 詳細については対応する C++ の API である 50 nn::gx::CTR::SetMemAccessPrioMode の説明を参照して下さい。 51 52 @param[in] mode アクセス優先度設定モード 53 @return なし。 54 *---------------------------------------------------------------------------*/ 55 void nngxSetMemAccessPrioMode( nngxMemAccessPrioMode mode ); 56 57 58 /*!--------------------------------------------------------------------------* 59 @brief 立体視表示が許可されているかどうかを取得します。 60 61 詳細については対応する C++ の API である 62 nn::gx::CTR::IsStereoVisionAllowed の説明を参照して下さい。 63 64 @return 立体視表示が許可されているなら true、そうでなければ false を返します。 65 *---------------------------------------------------------------------------*/ 66 bool nngxIsStereoVisionAllowed( void ); 67 68 69 /*---------------------------------------------------------------------------* 70 private: 71 *---------------------------------------------------------------------------*/ 72 void nngxSetAutoWaitMode( s32 paramIndex ); 73 74 #ifdef __cplusplus 75 } // extern "C" 76 #endif // __cplusplus 77 78 /*! 79 @} 80 */ 81 82 /*-------------------------------------------------------------------------- 83 C++ API 84 *-------------------------------------------------------------------------*/ 85 #ifdef __cplusplus 86 namespace nn { 87 namespace gx { 88 namespace CTR { 89 90 /*!--------------------------------------------------------------------------* 91 @enum MemAccessPrioMode 92 @brief メインメモリへのアクセス優先度の設定値です。 93 *---------------------------------------------------------------------------*/ 94 enum MemAccessPrioMode 95 { 96 /*! @brief CPU, GPU, その他デバイスが全て均等に扱われます。*/ 97 MEM_ACCESS_PRIO_MODE_0 = NN_GX_MEM_ACCESS_PRIO_MODE_0, 98 /*! @brief CPU からのアクセスが優先されます。*/ 99 MEM_ACCESS_PRIO_MODE_1 = NN_GX_MEM_ACCESS_PRIO_MODE_1, 100 /*! @brief CPU からのアクセスが強く優先されます。*/ 101 MEM_ACCESS_PRIO_MODE_2 = NN_GX_MEM_ACCESS_PRIO_MODE_2, 102 /*! @brief CPU と GPU からのアクセスが優先されます。*/ 103 MEM_ACCESS_PRIO_MODE_3 = NN_GX_MEM_ACCESS_PRIO_MODE_3, 104 /*! @brief GPU からのアクセスが優先されます。*/ 105 MEM_ACCESS_PRIO_MODE_4 = NN_GX_MEM_ACCESS_PRIO_MODE_4, 106 107 MEM_ACCESS_PRIO_MODE_MAX = NN_GX_MEM_ACCESS_PRIO_MODE_MAX 108 }; 109 110 /*!--------------------------------------------------------------------------* 111 @brief メインメモリ(FCRAM)へのアクセス優先度の設定を行います。 112 113 @param[in] mode アクセス優先度設定モード 114 @return なし。 115 *---------------------------------------------------------------------------*/ SetMemAccessPrioMode(MemAccessPrioMode mode)116 inline void SetMemAccessPrioMode( MemAccessPrioMode mode ) 117 { 118 nngxSetMemAccessPrioMode(static_cast<nngxMemAccessPrioMode>(mode)); 119 } 120 121 /*!--------------------------------------------------------------------------* 122 @brief 立体視表示が許可されているかどうかを取得します。 123 124 @return 立体視表示が許可されているなら true、そうでなければ false を返します。 125 *---------------------------------------------------------------------------*/ IsStereoVisionAllowed(void)126 inline bool IsStereoVisionAllowed( void ) 127 { 128 return nngxIsStereoVisionAllowed(); 129 } 130 131 /*---------------------------------------------------------------------------* 132 private: 133 *---------------------------------------------------------------------------*/ SetAutoWaitMode(s32 paramIndex)134 inline void SetAutoWaitMode( s32 paramIndex ) 135 { 136 nngxSetAutoWaitMode(paramIndex); 137 } 138 139 }}} // namespace nn::gx::CTR 140 #endif // __cplusplus 141 142 /*---------------------------------------------------------------------------*/ 143 144 #endif /* NN_GX_CTR_GX_MISC_H_ */ 145