Mobile (Android) orientations

monte at sweattechnologies.com monte at sweattechnologies.com
Fri May 3 16:15:48 CDT 2013


> I'll try and poke around the engine to find this. If it doesn't work the
> way I said I might submit a pull request to make it do that because it
> makes sense...

Here's the relevant code from the engine. As you can see it will match the
first device line it can to the device then the first subsequent
orientation_map line will be applied so you can have multiple device lines
and a single orientation_map line.

for (uint32_t i = 0; i < t_line_count; i++)
		{
			// check for CRLF line endings
			uint32_t t_line_length = MCCStringLength(t_lines[i]);
			if (t_line_length > 0 && t_lines[i][t_line_length - 1] == '\r')
				t_lines[i][t_line_length - 1] = '\0';

			if (MCCStringBeginsWith(t_lines[i], "device="))
			{
				t_this_device = (MCAndroidSignatureMatch(t_lines[i] + 7));
			}
			else if (t_this_device)
			{
				if (MCCStringBeginsWith(t_lines[i], "orientation_map="))
				{
					if
(MCAndroidSetOrientationMap(s_device_configuration.orientation_map,
t_lines[i] + 16))
						s_device_configuration.have_orientation_map = true;
				}
			}
		}





More information about the use-livecode mailing list