Minor changes

This commit is contained in:
Dimitris Panokostas 2017-03-01 13:23:32 +01:00
parent c080cbc15a
commit 4fdb666513
5 changed files with 13 additions and 32 deletions

View file

@ -101,7 +101,7 @@
<StepIntoNewInstanceEntry>main</StepIntoNewInstanceEntry>
<ExamineRegistersInRawFormat>true</ExamineRegistersInRawFormat>
<DisableSignals>false</DisableSignals>
<EnableAsyncExecutionMode>false</EnableAsyncExecutionMode>
<EnableAsyncExecutionMode>true</EnableAsyncExecutionMode>
<EnableNonStopMode>false</EnableNonStopMode>
</AdditionalGDBSettings>
<LaunchGDBSettings xsi:type="GDBLaunchParametersNewInstance">
@ -111,9 +111,9 @@
</LaunchGDBSettings>
<GenerateCtrlBreakInsteadOfCtrlC>false</GenerateCtrlBreakInsteadOfCtrlC>
<DeploymentTargetPath>/home/pi/projects/amiberry/$(TargetFileName)</DeploymentTargetPath>
<X11WindowMode>Remote</X11WindowMode>
<X11WindowMode>Local</X11WindowMode>
<KeepConsoleAfterExit>false</KeepConsoleAfterExit>
<RunGDBUnderSudo>true</RunGDBUnderSudo>
<RunGDBUnderSudo>false</RunGDBUnderSudo>
<DeploymentMode>Auto</DeploymentMode>
<LdLibraryPath />
<DeployWhenLaunchedWithoutDebugging>true</DeployWhenLaunchedWithoutDebugging>

View file

@ -69,6 +69,7 @@
<ProjectFile>Amiberry.vcxproj</ProjectFile>
<RemoteBuildEnvironment>
<Records />
<EnvironmentSetupFiles />
</RemoteBuildEnvironment>
<ParallelJobCount>1</ParallelJobCount>
</Build>
@ -104,29 +105,17 @@
<EnableNonStopMode>false</EnableNonStopMode>
</AdditionalGDBSettings>
<LaunchGDBSettings xsi:type="GDBLaunchParametersNewInstance">
<GDBEnvironment>
<Records>
<Record>
<VariableName>LANG</VariableName>
<Value>en_US.UTF-8</Value>
</Record>
<Record>
<VariableName>PATH</VariableName>
<Value>C:\SysGCC\raspberry\bin;%PATH%</Value>
</Record>
</Records>
<EnvironmentSetupFiles />
</GDBEnvironment>
<DebuggedProgram>$(TargetPath)</DebuggedProgram>
<GDBServerPort>2000</GDBServerPort>
<ProgramArguments />
</LaunchGDBSettings>
<GenerateCtrlBreakInsteadOfCtrlC>false</GenerateCtrlBreakInsteadOfCtrlC>
<DeploymentTargetPath>/tmp/$(TargetFileName)</DeploymentTargetPath>
<DeploymentTargetPath>/home/pi/projects/amiberry/$(TargetFileName)</DeploymentTargetPath>
<X11WindowMode>Local</X11WindowMode>
<KeepConsoleAfterExit>false</KeepConsoleAfterExit>
<RunGDBUnderSudo>false</RunGDBUnderSudo>
<DeploymentMode>Auto</DeploymentMode>
<LdLibraryPath />
<DeployWhenLaunchedWithoutDebugging>true</DeployWhenLaunchedWithoutDebugging>
<SuppressTTYCreation>false</SuppressTTYCreation>
</Debug>

View file

@ -55,7 +55,7 @@
<Link>
<AdditionalLinkerInputs>-Wl,-gc-sections,-rpath,/usr/local/lib;%(Link.AdditionalLinkerInputs)</AdditionalLinkerInputs>
<LibrarySearchDirectories>../../src/guisan/lib;=/opt/vc/lib;=/usr/local/lib;%(Link.LibrarySearchDirectories)</LibrarySearchDirectories>
<AdditionalLibraryNames>SDL2;pthread;m;z;SDL2_image;png;rt;xml2;FLAC;mpg123;dl;SDL2_ttf;guisan;%(Link.AdditionalLibraryNames)</AdditionalLibraryNames>
<AdditionalLibraryNames>SDL2;SDL2_image;SDL2_ttf;pthread;m;z;png;rt;xml2;FLAC;mpg123;dl;guisan;%(Link.AdditionalLibraryNames)</AdditionalLibraryNames>
<LinkerScript />
<ExtraRPATH>=/usr/local/lib;%(ExtraRPATH)</ExtraRPATH>
</Link>

View file

@ -985,22 +985,13 @@ static int real_main2 (int argc, TCHAR **argv)
{
printf("Amiberry-SDL2 by Dimitris (MiDWaN) Panokostas\n");
SDL_bool hintSet;
hintSet = SDL_SetHint(SDL_HINT_GRAB_KEYBOARD, "1");
if (hintSet != SDL_TRUE)
SDL_Log("SDL could not grab the keyboard");
hintSet = SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengles2");
if (hintSet != SDL_TRUE)
SDL_Log("SDL could not set OpenGLES 2 as the Render driver");
if (SDL_Init(SDL_INIT_EVERYTHING) != 0)
{
SDL_Log("SDL could not initialize! SDL_Error: %s\n", SDL_GetError());
abort();
}
sdlWindow = SDL_CreateWindow("Amiberry v2",
sdlWindow = SDL_CreateWindow("Amiberry-SDL2 v2",
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
0,
@ -1010,12 +1001,15 @@ static int real_main2 (int argc, TCHAR **argv)
renderer = SDL_CreateRenderer(sdlWindow, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
check_error_sdl(renderer == nullptr, "Unable to create a renderer");
if (SDL_GetWindowDisplayMode(sdlWindow, &sdlMode) != 0)
{
SDL_Log("Could not get information about SDL Mode! SDL_Error: %s\n", SDL_GetError());
}
if (SDL_SetHint(SDL_HINT_GRAB_KEYBOARD, "1") != SDL_TRUE)
SDL_Log("SDL could not grab the keyboard");
set_config_changed();
if (restart_config[0]) {
default_prefs(&currprefs, 0);

View file

@ -715,7 +715,7 @@ int main(int argc, char* argv[])
// set capslock state based upon current "real" state
ioctl(0, KDGKBLED, &kbd_flags);
ioctl(0, KDGETLED, &kbd_led_status);
if ((kbd_flags & 07) & LED_CAP)
if (kbd_flags & 07 & LED_CAP)
{
// record capslock pressed
kbd_led_status |= LED_CAP;
@ -755,8 +755,6 @@ int handle_msgpump()
int got = 0;
SDL_Event rEvent;
int keycode;
int modifier;
int i, num;
while (SDL_PollEvent(&rEvent))
{