Changes

→‎Events: Update poll events. The 3DS doesn't use the same event flags as the Wii
Line 77: Line 77:     
=Events=
 
=Events=
Events are a bitwise set of these flags.
+
Events are a bitwise set of these flags. These flags don't exactly match the Wii flags, even though the sockets sysmodule uses the same codebase.
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 85: Line 86:  
|-
 
|-
 
| 0x01
 
| 0x01
| POLLRDNORM
+
| POLLIN
| Normal data can be read.
+
| Data can be read.
 
|-
 
|-
 
| 0x02
 
| 0x02
| POLLRDBAND
  −
| Priority Band Data can be read.
  −
|-
  −
| 0x04
   
| POLLPRI
 
| POLLPRI
 
| Urgent data can be read.
 
| Urgent data can be read.
Line 105: Line 102:  
|-
 
|-
 
| 0x20
 
| 0x20
| POLLERR
  −
| Socket has an error condition.
  −
|-
  −
| 0x40
  −
| POLLHUP
  −
| Socket has been disconnected.
  −
|-
  −
| 0x80
   
| POLLNVAL
 
| POLLNVAL
| Invalid socket handle. This is set if you use fd=-1, which is non-standard behavior.
+
| Invalid socket handle.
|-
  −
| POLLRDNORM <nowiki>|</nowiki> POLLRDBAND
  −
| POLLIN
  −
| Data can be read.
   
|-
 
|-
 
| POLLWRNORM
 
| POLLWRNORM
Line 124: Line 109:  
| Data can be written.
 
| Data can be written.
 
|}
 
|}
 +
 +
Flag 0x4 isn't ever assigned in the code. Flags 0x40 and 0x80 are also not used, even though they are assgined in the input events by default along with 0x20. This is likely because that code section was inherited from the Wii, where these flags are used for poll errors.
 +
 +
Contrary to the Wii sockets, the 3DS doesn't have POLLERR or POLLHUP, so poll shouldn't be relied on when checking for socket errors.
106

edits