diff --git a/build/jam/HaikuImage b/build/jam/HaikuImage index f997b78f3f..0930e77676 100644 --- a/build/jam/HaikuImage +++ b/build/jam/HaikuImage @@ -174,7 +174,9 @@ AddSymlinkToHaikuImage beos system lib : libnetwork.so : libnet.so ; AddSymlinkToHaikuImage beos system lib : libnetwork.so : libnetapi.so ; AddSymlinkToHaikuImage beos system lib : libnetwork.so : libbnetapi.so ; # libGL.so have GLUT built-in +if $(TARGET_ARCH) = x86 { AddSymlinkToHaikuImage beos system lib : $(X86_ONLY)libGL.so : libglut.so ; +} # servers AddFilesToHaikuImage beos system servers : $(BEOS_SYSTEM_SERVERS) ; @@ -306,6 +308,9 @@ local keymapFiles = [ GLOB [ FDirName $(HAIKU_TOP) src data etc keymaps ] : *.keymap ] ; keymapFiles = $(keymapFiles:BG=keymap) ; AddFilesToHaikuImage beos etc Keymap : $(keymapFiles) ; +AddSymlinkToHaikuImage beos etc Keymap : Swedish : Finnish ; +AddSymlinkToHaikuImage beos etc Keymap : Slovene : Croatian ; +AddSymlinkToHaikuImage beos etc Keymap : US-International : Brazilian ; local timezones = [ FTimeZoneBinaries $(HAIKU_TIME_ZONE_SOURCES) : : true ] ; for timezone in $(timezones) { diff --git a/src/preferences/keymap/Keymap.cpp b/src/preferences/keymap/Keymap.cpp index 1c457082a3..11456eac9c 100644 --- a/src/preferences/keymap/Keymap.cpp +++ b/src/preferences/keymap/Keymap.cpp @@ -86,21 +86,28 @@ status_t Keymap::Load(entry_ref &ref) { status_t err; - - BFile file(&ref, B_READ_ONLY); - if ((err = file.InitCheck()) != B_OK) { - printf("error %s\n", strerror(err)); + BEntry entry(&ref, true); + if ((err = entry.InitCheck()) != B_OK) { + fprintf(stderr, "error loading keymap: %s\n", strerror(err)); return err; } - if (file.Read(&fKeys, sizeof(fKeys)) < (ssize_t)sizeof(fKeys)) { + BFile file(&entry, B_READ_ONLY); + if ((err = file.InitCheck()) != B_OK) { + fprintf(stderr, "error loading keymap: %s\n", strerror(err)); + return err; + } + + if ((err = file.Read(&fKeys, sizeof(fKeys))) < (ssize_t)sizeof(fKeys)) { + fprintf(stderr, "error reading keymap keys: %s\n", strerror(err)); return B_BAD_VALUE; } for (uint32 i=0; i