1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8<title>WPADClampTrigger</title>
9</head>
10
11<body>
12
13<h1>WPADClampTrigger</h1>
14
15<h2>Syntax</h2>
16<dl><dd><pre class="construction">
17#include &lt;revolution/wpad.h&gt;
18
19#define WPAD_CHAN0                    0
20#define WPAD_CHAN1                    1
21#define WPAD_CHAN2                    2
22#define WPAD_CHAN3                    3
23
24#define WPAD_TRIGGER_FIXED_BASE       0
25#define WPAD_TRIGGER_INDIVIDUAL_BASE  1
26
27void WPADClampTrigger( s32 chan, void *status, u32 type );
28</pre></dd></dl>
29
30<h2>Arguments</h2>
31<TABLE class="arguments" border="1" >
32  <TBODY>
33    <TR>
34<TH>chan</TH>
35<TD>One of the <code>WPAD_CHAN*</code>.</TD>
36    </TR>
37    <TR>
38<TH>status</TH>
39<TD>Pointer to the <a href="./WPADStatus.html"><code>WPADStatus</code></a> structure to be clamped. If the <SPAN class="argument">err</SPAN> member stores <CODE>WPAD_ERR_NONE</CODE>, the analog trigger input value is clamped according to the algorithm below.</TD>
40    </TR>
41    <TR>
42<TH>type</TH>
43<TD>Stores either <code>WPAD_TRIGGER_FIXED_BASE</code> or <code>WPAD_TRIGGER_INDIVIDUAL_BASE</code>.</TD>
44    </TR>
45  </TBODY>
46</TABLE>
47
48<h2>Return Values</h2>
49<p>None.</p>
50
51<H2>Description</H2>
52<p>Clamps the analog trigger inputs of a Classic Controller.</p>
53<p>
54The algorithm for clamping the analog trigger can be specified using <SPAN class="argument">type</SPAN> as shown in the figure below. If <code>WPAD_TRIGGER_FIXED_BASE</code> is specified, trigger input is clamped to a lower limit of 30 and an upper limit of 180 just like the clamp algorithm used for the analog trigger of the GameCube standard controller. If <code>WPAD_TRIGGER_INDIVIDUAL_BASE</code> is specified, clamping is performed using the lower limit value for each classic controller unit as obtained using the <a href="./WPADGetCLTriggerThreshold.html"><code>WPADGetCLTriggerThreshold</code></a> function and the upper limit value as (the obtained lower limit value + 180).
55</p>
56
57<P><IMG src="WPADClampTrigger.gif" alt="WPADClampTrigger.gif" width="575" height="375"></P>
58
59<h2>See Also</h2>
60<p class="reference">
61<A href="./WPADGetCLTriggerThreshold.html">WPADGetCLTriggerThreshold</A>,
62<A href="./WPADStatus.html">WPADStatus</A>
63</p>
64
65<H2>Revision History</H2>
66<P>
672006/08/15 Initial version.<br>
68</p>
69
70<hr><p>CONFIDENTIAL</p></body>
71</html>